Skip to content

text-area-scrollable#839

Open
AndreasAbdi wants to merge 4 commits into
mainfrom
text-area-scrollable
Open

text-area-scrollable#839
AndreasAbdi wants to merge 4 commits into
mainfrom
text-area-scrollable

Conversation

@AndreasAbdi

Copy link
Copy Markdown
Contributor

{
"project": "Styled Scrollable Text Areas",
"branchName": "text-area-scrollable",
"description": "Provide a reusable, accessible textarea experience whose overflowing content uses the dashboard's designed scrollbar treatment, then apply it to the submit-work text content field so long submitted text remains editable, scrollable, visually consistent, and payload-safe.",
"context": {
"customerAsk": "The submit-work text content submitter works, but when there is too much scroll content the textarea uses the default browser scroller instead of the designed scroller. The customer wants a new generic textarea component or equivalent shared solution and wants it used in submit-work text content so scrolling is styled.",
"problem": "Long submit-work text content is functionally editable, but the overflow experience is visually inconsistent and annoying because the scrollbar falls back to the browser-default appearance. A one-off submit-work fix would leave the same problem likely to recur on future textarea surfaces, and the change must preserve native editing, accessibility, validation, disabled, and submission behavior.",
"solution": "Introduce or extend a shared textarea primitive or variant that constrains overflowing content and applies the dashboard's styled scrollbar treatment while preserving native textarea behavior. Use that shared behavior in the submit-work inline text content field, then verify long-content scrolling, payload preservation, accessibility, and responsive layout through focused tests and browser inspection."
},
"acceptanceCriteria": [
"Long text entered or pasted into the submit-work text content field remains editable, scrollable, and visually constrained instead of expanding the form indefinitely.",
"The visible scrollbar for overflowing submit-work text content uses the dashboard's designed scrollbar treatment rather than the unstyled browser-default appearance in supported browsers.",
"The textarea preserves native authoring behavior, including typing, paste, text selection, focus, keyboard scrolling, disabled/submitting state, and accessible labeling.",
"The scrollbar styling is available through a reusable textarea primitive or variant so future textarea surfaces can adopt the same behavior without duplicating page-specific CSS.",
"The submit-work form remains usable at small, medium, and large viewport widths, with no horizontal page scroll or overlap caused by long textarea content.",
"Automated tests cover the changed textarea behavior and the submit-work long-content regression at the most direct useful layer.",
"Quality gate: typecheck, lint, focused frontend tests, and any applicable broader verification all pass."
],
"userStories": [
{
"id": "text-area-scrollable-001",
"title": "Reusable styled-scroll textarea behavior",
"description": "As a dashboard user, I want textarea fields with long content to scroll with the designed scrollbar treatment so form controls look and behave consistently.",
"acceptanceCriteria": [
"A shared textarea primitive or variant renders as a native textarea with constrained vertical overflow when its content exceeds the visible area.",
"Overflowing textarea content uses the dashboard's styled scrollbar treatment in supported browsers while remaining scrollable in browsers with limited scrollbar styling support.",
"The textarea keeps accessible label relationships, visible focus treatment, keyboard focusability, text selection, typing, paste, and disabled behavior.",
"Existing textarea usages that require plain or borderless presentation can opt out or keep their current appearance without receiving unintended field styling.",
"Focused component tests cover the styled-scroll variant, opt-out/plain behavior, and native authoring behavior.",
"Typecheck passes",
"Tests pass",
"Verify in browser using dev-browser skill"
],
"priority": 1,
"passes": true,
"notes": ""
},
{
"id": "text-area-scrollable-002",
"title": "Submit-work text content uses styled scrolling",
"description": "As a user submitting text work, I want long text content to stay inside a usable scrollable field so I can review and edit the request without the form becoming awkward.",
"acceptanceCriteria": [
"The submit-work text content field uses the shared styled-scroll textarea behavior for inline text work items.",
"With long content, the submit-work text field has a stable maximum visible height and scrolls internally instead of expanding the submit-work form indefinitely.",
"The field's label, required/error state, helper text relationship, typed change handling, paste handling, and disabled/submitting treatment remain unchanged from the user's perspective.",
"Submitting a valid request with long text content sends the same text payload as before, without truncation or added formatting.",
"Focused submit-work tests cover long-content scrolling constraints and unchanged authoring/submission behavior.",
"Typecheck passes",
"Tests pass",
"Verify in browser using dev-browser skill"
],
"priority": 2,
"passes": true,
"notes": ""
},
{
"id": "text-area-scrollable-003",
"title": "Responsive and regression verification for long text entry",
"description": "As a dashboard user on different screen sizes, I want the submit-work text field to remain usable with long content so I can submit work from narrow and wide layouts.",
"acceptanceCriteria": [
"Browser verification covers the submit-work text content field with long pasted content at small, medium, and large viewport widths.",
"At each verified viewport, the textarea remains readable, the scrollbar is visible when needed, form controls remain reachable, and no horizontal page scrolling or incoherent overlap appears.",
"Keyboard-only verification confirms the user can tab to the textarea, move within the text, scroll the overflowing content, and continue to the submit action.",
"The implementation records the focused verification command or test path used so reviewers can repeat the regression check.",
"Typecheck passes",
"Tests pass",
"Verify in browser using dev-browser skill"
],
"priority": 3,
"passes": true,
"notes": ""
}
]
}

Made with Cursor

AndreasAbdi and others added 3 commits June 20, 2026 12:35
…vior

Co-authored-by: Cursor <cursoragent@cursor.com>
… scrolling

Co-authored-by: Cursor <cursoragent@cursor.com>
…on for long text entry

Co-authored-by: Cursor <cursoragent@cursor.com>
@AndreasAbdi

Copy link
Copy Markdown
Contributor Author

BLOCKING review summary

Findings

  1. BLOCKING: the new repeatable browser-verification command added by this PR is broken, so reviewers cannot actually run the promised regression check. ui/package.json:33 wires storybook:submit-work-textarea-scrollable-check to ui/scripts/run-submit-work-textarea-scrollable-browser-check.mjs:1, which calls ensureStorybookServer() from ui/scripts/run-storybook-responsive-check.mjs:33. That helper still waits for /iframe.html?id=you-agent-factory-dashboard-export-factory-dialog--ready&viewMode=story via ui/scripts/run-storybook-ci.mjs:12 and ui/scripts/run-storybook-ci.mjs:149, but the generated ui/storybook-static/ output on this branch does not contain iframe.html, so the command fails immediately with Error: Received 404 ... /iframe.html?.... Because this PR explicitly adds that command as the documented verification path, it needs to be updated to match the current Storybook output before this can be accepted.

  2. BLOCKING: the required repo verification did not pass locally. make test failed in cmd/gocoveragecheck with:

  • TestMainFailsWhenZeroCoveragePackagesDetectedViaFailf
  • TestMainFailsWithZeroCoveragePackageSummary
  • TestMainFailsWithZeroCoverageOKPackageSummary
  • TestMainFailsWithZeroCoverageCoverpkgOKPackageSummary
  • TestExecuteFailsWhenCoverageBelowMinimumAndZeroCoveragePackage
  • TestExecuteFailsWhenZeroCoveragePackageOnly
    Per the review instructions, a failing required check is blocking even if it looks unrelated to the UI diff.

Acceptance criteria

  • PASS: Long text entered or pasted into the submit-work text content field remains editable, scrollable, and visually constrained instead of expanding the form indefinitely. Focused UI tests passed, and in browser the textarea overflowed internally (scrollHeight > clientHeight) instead of growing the card.
  • PASS: The visible scrollbar for overflowing submit-work text content uses the dashboard's designed scrollbar treatment rather than the unstyled browser-default appearance in supported browsers. The shared textarea now carries af-styled-scrollbar, and browser inspection on the story showed the styled class plus scrollbar-width: thin on the live textarea.
  • PASS: The textarea preserves native authoring behavior, including typing, paste, text selection, focus, keyboard scrolling, disabled/submitting state, and accessible labeling. Focused tests passed for change/disabled behavior, and browser verification showed keyboard navigation inside the textarea plus Tab traversal to Submit.
  • PASS: The scrollbar styling is available through a reusable textarea primitive or variant so future textarea surfaces can adopt the same behavior without duplicating page-specific CSS. The shared Textarea field variant now owns the scrollbar class and the reusable CSS lives in shared UI/styles.
  • PASS: The submit-work form remains usable at small, medium, and large viewport widths, with no horizontal page scroll or overlap caused by long textarea content. Browser verification against the Storybook submit-work story passed at 390x844, 768x1024, and 1440x900; the iframe document width matched its scroll width at each size and the submit action remained reachable.
  • PASS: Automated tests cover the changed textarea behavior and the submit-work long-content regression at the most direct useful layer. cd ui && bun x vitest run src/components/ui/textarea.test.tsx src/features/submit-work/components/submit-work-card.test.tsx src/features/submit-work/components/long-text-scrollable/submit-work-card-long-text-responsive.test.tsx src/features/submit-work/hooks/use-submit-work-widget-helpers.test.ts scripts/verify-submit-work-textarea-scrollable-storybook-responsive.test.mjs passed (5 files, 32 tests).
  • FAIL: Quality gate: typecheck, lint, focused frontend tests, and any applicable broader verification all pass. cd ui && bun run tsc passed, cd ui && bun run lint passed, and the focused UI tests passed, but make test failed and the newly added Storybook browser-check command failed.

Story behavioral-assertion check

  • PASS: each passes:true story in prd.json includes behavioral assertions, not just structural compile/test gates.

Verification evidence

  • make test FAIL
  • cd ui && bun x vitest run src/components/ui/textarea.test.tsx src/features/submit-work/components/submit-work-card.test.tsx src/features/submit-work/components/long-text-scrollable/submit-work-card-long-text-responsive.test.tsx src/features/submit-work/hooks/use-submit-work-widget-helpers.test.ts scripts/verify-submit-work-textarea-scrollable-storybook-responsive.test.mjs PASS
  • cd ui && bun run tsc PASS
  • cd ui && bun run lint PASS
  • cd ui && bun run build-storybook produced storybook-static
  • AGENT_FACTORY_STORYBOOK_HOST=127.0.0.1 AGENT_FACTORY_STORYBOOK_PORT=6123 bun run storybook:submit-work-textarea-scrollable-check FAIL with the iframe.html 404 noted above
  • Manual browser verification on http://127.0.0.1:6123/?path=/story/agent-factory-dashboard-submit-work-card--long-text-scrollable-verification confirmed internal textarea overflow, keyboard scroll movement, Submit focus traversal, and no horizontal overflow at mobile/tablet/desktop widths

Make the documented submit-work Storybook verification command build static output and wait on index.json only, and restore gocoveragecheck baseline test isolation so required Go tests pass again.

Co-authored-by: Cursor <cursoragent@cursor.com>
@AndreasAbdi

Copy link
Copy Markdown
Contributor Author

Addressed the blocking review items on 41ef394f4:

  1. Storybook browser verification commandstorybook:submit-work-textarea-scrollable-check now runs build-storybook first and the submit-work script passes waitReady: waitForStorybookIndexReady, so readiness waits on index.json only instead of the export-factory iframe smoke URL that returned 404. Verified locally: cd ui && bun run storybook:submit-work-textarea-scrollable-check.

  2. make test / gocoveragecheck failuresrun() now honors absolute -package-baseline paths (temp test baselines were previously joined under repo root and could not load). Zero-coverage entrypoint/run tests use an isolated temp baseline so repo baselining of pkg/config no longer masks assertions. Verified locally: go test ./cmd/gocoveragecheck/... and make verify-fast.

  3. UI Coverage function threshold (94.84% vs 94.9%) — slimmed the long-text Storybook file to reuse parent CSF meta/decorators (avoids duplicate story setup functions). Watching CI UI Coverage on this push for confirmation.

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.

1 participant