Skip to content

forms: expand disclosure content into continuous answer (avoid duplicated preview) - #1869

Merged
BigSimmo merged 46 commits into
mainfrom
codex/fix-form-section-expansion-issues
Aug 12, 2026
Merged

forms: expand disclosure content into continuous answer (avoid duplicated preview)#1869
BigSimmo merged 46 commits into
mainfrom
codex/fix-form-section-expansion-issues

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Aug 12, 2026

Copy link
Copy Markdown
Owner

Motivation

  • The form information UI showed the same text twice when a disclosure was opened — a collapsed preview line remained visible and the full answer was shown again in the revealed panel, producing a duplicated, visually separated snippet.
  • The intent is to make a tap/expand produce one continuous, readable answer (remove the preview when expanded) while preserving existing disclosure behavior for other consumers and accessibility semantics.

Description

  • Added an opt-in extendDescription prop to the Disclosure component and passed it through DisclosureGroup so callers can request the new presentation mode. (modified src/components/ui/disclosure.tsx).
  • When extendDescription is enabled the trigger’s collapsed preview is hidden while the panel is open and the panel omits the top divider so the text reads as one continuous answer (adjusted trigger rendering and panel classes). (modified src/components/ui/disclosure.tsx).
  • Enabled the new mode for form rows by setting extendDescription: true inside formInformationItems(...), so form information rows replace the preview with the full wrapped content when expanded. (modified src/components/forms/form-detail-page.tsx).
  • Added and updated automated checks to assert the behavior: a DOM unit test ensures the preview disappears and full text is visible once expanded, and a Playwright e2e test verifies the mobile presentation and absence of the separating border; test files were updated accordingly. (modified tests/forms-information-disclosure.dom.test.tsx, added test snippet in tests/ui-forms-section-nav.spec.ts).

Testing

  • Ran the repository design sweep (workflow:design-sweep) and npm run ensure to confirm the local app; both completed and the local app reported as running at the repository URL.
  • Ran the Playwright e2e spec covering forms section navigation and the added mobile check, which executed and verified the preview replacement and visual result on Chromium.
  • Ran the unit/test suite (npm run test) and formatting (npm run format), and the updated focused DOM test asserting the preview is removed when expanded passed.
  • Captured a mobile screenshot of the expanded disclosure to visually confirm the continuous answer presentation; all automated checks passed locally, and no remote PR was opened because the environment had no authenticated GitHub CLI available.

Codex Task

Summary by CodeRabbit

  • New Features

    • Disclosure panels can now extend their descriptions when expanded for a seamless reading experience.
    • Extended content remains correctly visible in print layouts.
    • Forms information disclosures now use the extended-description presentation.
  • Bug Fixes

    • Prevented expanded content from being duplicated inside triggers or separated by unnecessary borders.
  • Tests

    • Added coverage for expanded, collapsed, and print disclosure behavior.

@supabase

supabase Bot commented Aug 12, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 1 minute

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 24f7eb98-4240-4946-a116-aafddaf126f3

📥 Commits

Reviewing files that changed from the base of the PR and between a15e28d and 42174cf.

📒 Files selected for processing (3)
  • docs/design-system/adoption-manifest.json
  • tests/forms-information-disclosure.dom.test.tsx
  • tests/ui-forms-section-nav.spec.ts

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5472cfad-ac01-4907-b44f-217d21d81439

📥 Commits

Reviewing files that changed from the base of the PR and between e9d05f2 and a15e28d.

📒 Files selected for processing (3)
  • src/components/ui/disclosure.tsx
  • tests/forms-information-disclosure.dom.test.tsx
  • tests/ui-v2-components.dom.test.tsx
🚧 Files skipped from review as they are similar to previous changes (3)
  • tests/ui-v2-components.dom.test.tsx
  • src/components/ui/disclosure.tsx
  • tests/forms-information-disclosure.dom.test.tsx

📝 Walkthrough

Walkthrough

Disclosure and DisclosureGroup now support extended descriptions. Form information disclosures enable this mode. Rendering, print behavior, design metadata, and mobile and DOM tests were updated.

Changes

Extended disclosure behavior

Layer / File(s) Summary
Disclosure API and rendering
.design-sync/config.json, src/components/ui/disclosure.tsx
Adds extendDescription to disclosure props and metadata. Open disclosures hide the preview, remove panel separation, and force panel visibility when printed.
Form integration and validation
src/components/forms/form-detail-page.tsx, tests/forms-information-disclosure.dom.test.tsx, tests/ui-forms-section-nav.spec.ts, tests/ui-v2-components.dom.test.tsx, docs/design-system/adoption-manifest.json
Enables extended descriptions for form information items. Tests verify continuous mobile rendering and single visible print output. The adoption manifest lists the browser test.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant FormDetailPage
  participant Disclosure
  participant DisclosurePanel
  participant BrowserTests
  FormDetailPage->>Disclosure: Configure extendDescription=true
  Disclosure->>DisclosurePanel: Render extended content when expanded
  Disclosure->>DisclosurePanel: Apply continuous panel and print visibility styles
  BrowserTests->>Disclosure: Expand disclosure and inspect screen or print output
Loading

Possibly related PRs

  • BigSimmo/Database#1712: Both changes modify Disclosure and its hidden and print rendering tests.
  • BigSimmo/Database#1735: This change extends the Disclosure and DisclosureGroup behavior used by the related form-detail implementation.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: expanding disclosure content into one continuous answer without a duplicated preview.
Description check ✅ Passed The description explains the motivation, implementation, affected files, and verification results for the UI change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-form-section-expansion-issues

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

@BigSimmo
BigSimmo marked this pull request as ready for review August 12, 2026 18:15

@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: 6cdd58c09d

ℹ️ 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/ui/disclosure.tsx
@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

CI triage

CI failed on this PR. Automated classification of the 2 failed job(s):

  • Production UI (3)needs investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • PR requiredneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.

Compared with main CI run #10109 (success).

Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger.

@BigSimmo
BigSimmo enabled auto-merge August 12, 2026 19:28

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/design-system/adoption-manifest.json`:
- Around line 534-538: Update the DisclosureGroup entry in the adoption manifest
to include the form DOM and browser test files covering
DisclosureGroup.items[].extendDescription, alongside its existing testFiles.
Keep the Disclosure entry unchanged and register the tests under
DisclosureGroup’s public API coverage.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0982fd90-73d0-44b3-ae9d-bbd5bd8447e7

📥 Commits

Reviewing files that changed from the base of the PR and between b850a58 and e9d05f2.

📒 Files selected for processing (7)
  • .design-sync/config.json
  • docs/design-system/adoption-manifest.json
  • src/components/forms/form-detail-page.tsx
  • src/components/ui/disclosure.tsx
  • tests/forms-information-disclosure.dom.test.tsx
  • tests/ui-forms-section-nav.spec.ts
  • tests/ui-v2-components.dom.test.tsx

Comment thread docs/design-system/adoption-manifest.json

Copy link
Copy Markdown
Owner Author

Addressed the actionable design-system feedback on the current branch. DisclosureGroup now registers the existing form DOM and browser tests in its adoption-manifest coverage, alongside the design-sync test.

@BigSimmo
BigSimmo disabled auto-merge August 12, 2026 21:00

BigSimmo commented Aug 12, 2026

Copy link
Copy Markdown
Owner Author

Final review-and-fix summary

Final state

Issues fixed and dispositioned

  • Preserved the opt-in extendDescription behaviour so expanded form disclosures show one continuous answer rather than retaining a duplicated preview and divider.
  • Corrected print rendering: collapsed panels use an author-level hidden utility instead of the HTML hidden attribute, allowing print:block to reveal the full panel while print:hidden suppresses the trigger preview. This prevents both omitted and duplicated print content.
  • Added DOM and Chromium regression coverage for collapsed, expanded, mobile, controlled/uncontrolled, and print behaviour.
  • Registered the form DOM and browser tests under DisclosureGroup.testFiles through stable generator-detectable source evidence, then regenerated the adoption manifest.
  • Removed unrelated specifier-test churn and all temporary repair workflows from the final diff.
  • Resolved the branch conflict/behind-state with merge-from-main commits only. No rebase, force-push, history rewrite, deployment, release, or auto-merge change was performed.
  • No material pre-existing debt was changed. Earlier Gitleaks HTTP 503 and Deno download socket failures occurred on superseded heads and were external infrastructure failures.

Review and comments

  • Completed a distinct adversarial pass covering state correctness, ARIA relationships, screen and print behaviour, mobile layout, compatibility, regression scope, generator stability, and unrelated-change risk. No additional high-confidence PR-introduced defect remained.
  • A complete fresh CodeRabbit pass was constrained by the organisation review/spending cap. Its latest available incremental review reported no actionable findings.
  • Review threads: 2/2 resolved and current:
    • print duplication/visibility regression — fixed and verified
    • DisclosureGroup behavioural-test registration — fixed and regeneration-verified
  • No unresolved actionable review comment remained at merge.

Exact-head required CI

All required checks passed on 42174cf1612c3d844f066de2add6cddefc169961. Nothing required was pending, missing, skipped, or failed:

  • PR required
  • Change scope
  • Static PR checks, including formatting, lint, typecheck, ledger integrity, documentation and design-system contracts
  • Build and enforced bundle budget
  • Unit coverage
  • Safety and configuration checks
  • Production UI critical
  • Production UI shards 1, 2, and 3
  • Secret Scan / Gitleaks
  • SAST / Semgrep and ingestion gate

Advisory and scoped checks

  • Lighthouse budget: passed.
  • Migration replay, container images, advisory UI, visual baselines, release-browser-matrix, and dispatch-only baseline refresh were correctly skipped by scope.
  • Supabase preview integration was ignored because this PR had no supabase directory changes.

Ledger and residual risk

  • No matching heavy-review ledger entry required a manual update. No ledger-only tip was created. Both ledger integrity gates passed.
  • No permission or CI blocker remained at merge.
  • Residual risk is low and limited to ordinary post-merge integration risk. The complete required and production UI matrix passed on the exact merged head.

PR #1869 is merged into main. The final merge was performed by BigSimmo, not by this review process.

@BigSimmo
BigSimmo merged commit c5f7e05 into main Aug 12, 2026
26 checks passed
@BigSimmo
BigSimmo deleted the codex/fix-form-section-expansion-issues branch August 12, 2026 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant