Skip to content

feat(ui): calmer plan + post-intake disclaimer modal gate (HOLD: lawyer sign-off) - #17

Open
AnikaWilliams wants to merge 2 commits into
fix/cantonal-cost-notesfrom
feat/calmer-ui
Open

AnikaWilliams wants to merge 2 commits into
fix/cantonal-cost-notesfrom
feat/calmer-ui

Conversation

@AnikaWilliams

Copy link
Copy Markdown
Owner

What & why

Design-research-led overhaul to make the relocation guide less overwhelming / legal-heavy and more encouraging, while keeping every claim sourced and the disclaimer present.

  • Gold "not legal advice" banner removed everywhere (intake, plan, waitlist).
  • Post-intake disclaimer modal gate — after the questionnaire (and on shared-link opens) a required, focus-trapped dialog ("Before your plan — please read") the user must confirm via "I've read and understand" before the plan renders. Wording is the compliance-owned disclaimer, single-sourced in new src/utils/disclaimer.ts; ack persisted in localStorage rg-disclaimer-ack-v1. No Esc/backdrop bypass.
  • Action-first task cards — tldr → "What you'll do" steps → Documents, with key facts, legal citations and detail behind one "Reference" fold; the repeated caveats consolidated into one "Sources & legal notes" fold (a short "General guidance only — not legal advice." line stays always visible on each card, per compliance).
  • Plain-language intake (drop "L/B/C permit", "concubinage" from options), stable phase progress ("Your route → situation → details") with progressbar a11y, warm all-breakpoint intro, quiet per-step momentum + a calmer document gate.

Disclaimer remains in: the modal · the footer on every page · a per-card line + "Sources & legal notes" fold · Impressum · the no-JS guide. The required Russia-sanctions notice is untouched.

Verification

astro check 0 errors · build + provenance gate (15 pages) · 277/277 tests · a11y review PASS (modal focus-trap, ARIA, no-bypass) · full flow confirmed live (modal gates → confirm reveals plan + persists; gold banner gone; canton-office links + cantonal fee notes intact).

⚠️ COMPLIANCE: CONDITIONAL — needs your lawyer's sign-off before merge

Coverage is technically intact, but moving from an always-visible banner to a one-time gate + collapsed notice is a legal-posture change outside the agents' authority. Lawyer must confirm:

  1. A one-time, per-browser acknowledgement modal is an acceptable substitute for a persistently-visible "not legal advice" notice on claim pages (GDPR/EU, Swiss FADP, UK, DE DDG/MStV, CCPA/PIPEDA/LGPD) — i.e. does "acknowledged once, then a short visible line + collapsible notice" meet "clear and conspicuous".
  2. That after first ack, the always-visible disclaimer being in the footer (below a full-viewport app) satisfies the per-page obligation.
  3. The exact modal copy (verbatim owned disclaimer + the progress-tracking sentence) carries nothing that reads as advice or a liability limitation needing separate ToU treatment.
  4. The required re-acknowledgement cadence (currently per-browser-forever via a version-bumped localStorage key) — per-session / periodic / per-corridor instead?
  5. Whether any audit trail of acknowledgement is legally required (current approach keeps none).
  6. That the hard-blocking modal (single exit control) creates no WCAG/EN 301 549/ADA exposure (a11y passed; flagged a small-viewport lockout edge to QA).
  7. That the pre-gate intake using only a slim "Informational only — not legal advice · Impressum" line is acceptable.

Merge order (stacked)

Base is fix/cantonal-cost-notes (PR #16) so this shows only the UI diff. Merge #16 → develop first (it has no hold), then retarget/merge this → develop after lawyer sign-off. As always, develop → main is yours.

Non-blocking follow-ups

a11y nits to polish later: phase-progress announcement already added; consider QA on very small viewports for the modal; both are noted.

🤖 Generated with Claude Code

Design-research-led overhaul to make the relocation guide less overwhelming
and legal-heavy while keeping every claim sourced and the disclaimer present.

- Remove the gold 'not legal advice' banner everywhere (intake, plan, waitlist).
- Post-intake DISCLAIMER MODAL GATE: a required, focus-trapped dialog (no
  bypass) the user must confirm ('I've read and understand') before the plan
  renders; also gates shared-link opens. Wording single-sourced from the
  compliance-owned Disclaimer in new src/utils/disclaimer.ts; ack persisted in
  localStorage rg-disclaimer-ack-v1.
- Task cards re-sequenced action-first (tldr -> steps -> documents); key facts,
  legal citations and detail moved behind one 'Reference' fold; per-card
  caveats consolidated into one 'Sources & legal notes' fold, with a short
  always-visible 'not legal advice' line kept on each card (compliance).
- Plain-language intake options (drop L/B/C permit codes, 'concubinage');
  stable phase-based progress (Your route -> situation -> details) with
  progressbar a11y; warm all-breakpoint intro; quiet per-step momentum + a
  calmer document gate.

Disclaimer remains in the modal + footer (every page) + per-card + Impressum +
the no-JS guide. Required Russia-sanctions notice untouched.

Verified: astro check 0 errors; build + provenance gate (15 pages); 277/277
tests; a11y review (modal focus-trap, ARIA, no-bypass) PASS; live preview of
the full flow. COMPLIANCE: CONDITIONAL — the modal-acknowledgement posture
(vs a persistent banner) needs human-lawyer sign-off before merge.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@AnikaWilliams

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 83efe18140

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/components/CorridorApp.tsx Outdated
Comment on lines +2213 to +2214
const stepsInPhase = visibleSteps.filter((s) => phaseOfStep(s.id) === currentPhaseId);
const idxInPhase = stepsInPhase.findIndex((s) => s.id === currentStep.id);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use a stable denominator for phase progress

When selecting a branch that reveals additional questions, the progress bar moves backward because stepsInPhase.length is recalculated from the newly expanded visibleSteps. For example, the motivation step is 50% before a choice, then selecting work changes it to 25%; selecting “I have a job offer” on work-status similarly drops that phase from 75% to 50%. This defeats the stated stable-progress behavior, so the fill should use a branch-stable denominator or be clamped against previously displayed progress.

Useful? React with 👍 / 👎.

Comment on lines +1562 to +1564
{link.lastVerified && (
<span className="ml-1 text-xs text-slate-500">link verified {link.lastVerified}</span>
)}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Forward verification dates to the island

On every generated corridor page, these new verification labels never render because src/pages/[origin]/[destination]/index.astro projects summaries and step links into appTasks without their lastVerified fields (lines 27 and 34), even though the YAML claims contain those dates. Since the property is optional, no type check catches the omission; pass it through the projection so the newly added provenance UI receives the data.

Useful? React with 👍 / 👎.

…island

- phaseProgressPct now divides by the phase's full step set (STEPS filtered
  by phase), not the branch-expanded visibleSteps, so revealing branch
  questions no longer shrinks the bar (motivation 50%->25%, work-status
  75%->50% regressions). The numerator still counts visible phase steps
  passed, keeping fill monotonic.
- index.astro appTasks projection now forwards lastVerified on task summary
  and step links so the provenance labels (CorridorApp.tsx 1562/1582/1599)
  actually render with the dates carried in the corridor YAML.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants