GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(legal): keep the consent sentence in sync with the policy it belongs to by kiodreambau · Pull Request #866 · OpenResilienceInitiative/ORISO-Admin

Conversation

@kiodreambau

@kiodreambau kiodreambau commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Problem

The consent sentence is a field of the data-protection policy (ADR-021 decision 4), so it must publish with the policy and never drift from it. Two places let it drift.

1. A forking Fachbereich shipped a policy whose consent sentence stayed on the level above

A Fachbereich that had not yet forked from the inherited text was seeded with the inherited body but with its own (empty) consent map. Publishing forked the policy for good (ADR-014 amendment) and left its consent sentence behind on the level above. This is a real bug found while doing the work, not a theoretical one.

2. The blocked-publish notice only appeared after you had already failed

The "cannot publish, {{legal_links}} is missing" notice only appeared after a failed Publish click. The rule arrived after texts were already live, so a stored sentence can be blocking on open — and in a language other than the one on screen, where nothing pointed at it.

Root cause

  • The fork seeded body and consent from two different sources.
  • The notice was derived from a failed click rather than from validation state.

Fix

  • The fork now seeds both from the same source and says which level the sentence came from. A Fachbereich that has already forked keeps its stored sentence, blank included — because blank means the level above still governs at runtime (ADR-021 decision 1).
  • The notice is now derived from the validation state, and names the blocked languages the way the admin reads them instead of as wire codes.

No i18n keys added; the existing publishBlocked strings already carry the language list. The client-side check stays a mirror of the server rule, so the admin is told before the request rather than by a 400.

Tests

New/extended coverage for:

  • the inline missing-token error,
  • the blank-is-inherited semantics,
  • a consent-only edit publishing a byte-identical body,
  • consentText actually reaching the publish endpoint.

Files: AgencyLegalTextContainer.consent.test.tsx (+75), DepartmentDataProtectionCard.consent.test.tsx (+150), usePublishDepartmentDpp.hook.test.tsx (+22).

Screenshot / evidence note

This one is deliberately not screenshotted. Both halves are behavioural: the fork-seeding bug is invisible until you publish and then inspect which level the stored sentence landed on, and the notice change is a change in when an already-existing notice appears, not in how it looks. A still image of the notice would prove nothing that the tests do not already prove, and would suggest visual work that was not done. The assertions above are the evidence.

Reviewer test plan

  • Take a Fachbereich that has not forked. Edit and publish. Confirm the published policy carries the consent sentence it inherited — it must not stay behind on the level above.
  • Take a Fachbereich that has forked with a blank consent sentence. Confirm the blank is preserved (blank = the level above governs at runtime) and is not "helpfully" refilled.
  • Store a consent sentence missing {{legal_links}} in a non-active language, then reopen the editor. The blocked notice appears immediately on open, without clicking Publish.
  • Confirm the notice names the language in words (e.g. "German"), not a wire code like de.
  • Make a consent-only edit and publish; the body should go up byte-identical.
  • Confirm you get the client-side block before the request, not a server 400.
  • Mobile 390x844: the notice with a multi-language list wraps rather than truncating.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@coderabbitai

coderabbitai Bot commented Aug 20, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 1d475f1f-07a0-4ae9-a58e-a559d49634db

Warning

Your free Security trial is over. An organization admin can activate billing to continue.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
  • X
  • Mastodon
  • Reddit
  • LinkedIn

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kiodreambau
kiodreambau requested review from Shirloin and shanzaeimran August 20, 2026 10:37
@kiodreambau kiodreambau assigned shanzaeimran and Shirloin Aug 20, 2026
@kiodreambau

kiodreambau commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

Evidence note

No screenshot for this PR — the reasoning is in the Screenshot / evidence note section of the description above, and it has not changed after attempting capture:

  • The fork-seeding bug is invisible until you publish and then inspect which level the stored consent sentence landed on. There is no frame in which the bug and the fix look different.
  • The notice change alters when an already-existing notice appears (on open, derived from validation state, rather than after a failed Publish click), not how it looks — plus it now names languages in words rather than wire codes, which is a string change inside the same component.

A still of the notice would look the same before and after and would suggest visual work that was not done. The assertions listed in the description are the evidence.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kiodreambau kiodreambau mentioned this pull request Aug 21, 2026
Owner review round 2026-08-20: legal editor, consent dialog, contract gate and wording #874
Closed
@kiodreambau

kiodreambau commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

Part of the owner review round #874.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@shanzaeimran

shanzaeimran commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator

@Storypapst @kiodreambau this PR has conflicts. Please resolve them so I can review it

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kiodreambau @claude @Shirloin
fix(legal): keep the consent sentence in sync with the policy it belo…
90255f4
…ngs to

The consent sentence is a field of the data-protection policy (ADR-021
decision 4), so it must publish with the policy and never drift from it.
Two places let it drift:

- A Fachbereich that has not forked from the inherited text yet was seeded
  with the inherited BODY but with its own (empty) consent map. Publishing
  forked the policy for good (ADR-014 amendment) and left its consent
  sentence behind on the level above. The fork now seeds both from the same
  source and says which level the sentence came from; a Fachbereich that has
  already forked keeps its stored sentence, blank included, because blank
  means the level above still governs at runtime (ADR-021 decision 1).

- The "cannot publish, {{legal_links}} is missing" notice only appeared
  after a failed Publish click. The rule arrived after texts were live, so a
  stored sentence can be blocking on open — and in a language other than the
  one on screen, where nothing pointed at it. The notice is now derived from
  the validation state and names the blocked languages the way the admin
  reads them instead of as wire codes.

No i18n keys added; the existing publishBlocked strings already carry the
language list. The client-side check stays a mirror of the server rule so
the admin is told before the request, not by a 400.

Adds coverage for the inline missing-token error and the blank-is-inherited
semantics, for a consent-only edit publishing a byte-identical body, and for
consentText reaching the publish endpoint.

Co-Authored-By: Claude Opus 5 <[email protected]>
@Shirloin
Shirloin force-pushed the fix/consent-draft-sync-job5 branch from 6be39ef to 90255f4 Compare August 24, 2026 12:17
@Shirloin @cursoragent
test(legal): open consent dialog in DPP card tests after #862
42e5e7a
CI failed because five consent tests still treated the sentence as an
inline textbox. Match LegalConsentField: open the CTA, edit in the
dialog, then save.

Co-authored-by: Cursor <[email protected]>
@Shirloin
Shirloin merged commit 202ead3 into pre-dev Aug 24, 2026
4 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@Shirloin
Shirloin deleted the fix/consent-draft-sync-job5 branch August 24, 2026 13:04
@kiodreambau kiodreambau mentioned this pull request Aug 24, 2026
feat(legal-editor): consent template chooser in the agency DPP function bar #864
Merged
7 tasks
@nikunjdecyb nikunjdecyb mentioned this pull request Aug 30, 2026
fix(legal): close remaining #874 consent-dialog, wording and template-chooser gaps #888
Merged
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@shanzaeimran shanzaeimran Awaiting requested review from shanzaeimran
@Shirloin Shirloin Awaiting requested review from Shirloin

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@Shirloin Shirloin

@shanzaeimran shanzaeimran

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@kiodreambau @shanzaeimran @Shirloin
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.