Skip to content

feat(app): expand-to-read for long requirement descriptions#3132

Merged
tofikwest merged 2 commits into
mainfrom
tofik/app-requirements-description-expand
Jun 12, 2026
Merged

feat(app): expand-to-read for long requirement descriptions#3132
tofikwest merged 2 commits into
mainfrom
tofik/app-requirements-description-expand

Conversation

@tofikwest

@tofikwest tofikwest commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

What

Adds a read-only "expand to read" affordance to requirement Descriptions in the customer app's framework Requirements view — the same idea as the framework editor's expand arrows, but read-only.

Why

Long requirement descriptions (e.g. NIST SP800-53 PL-2) are truncated to a single line in the app, and even the native tooltip is clipped — there was no way to read the full, verbose text. The framework editor already solved this; the app didn't.

Changes

  • New shared ExpandableDescription cell: shows the truncated text inline (keeps the native title tooltip) plus a hover maximize button that opens a read-only dialog with the full description. Heading is identifier · name (e.g. PL-2 · System Security and Privacy Plans).
  • Wired into both requirements tables — GroupedRequirementRow (grouped by family) and FrameworkRequirements (flat list).
  • The expand button stopPropagations so it doesn't trigger the row's navigate-to-requirement click.
  • Full description is already on the client (item.description) — no new fetch.

Read-only by design (customers view their framework instance; they don't edit the template), so it's a viewer dialog — no textarea/save.

Design system

Uses @trycompai/design-system Dialog + the Carbon Maximize icon. No @trycompai/ui / lucide-react. DialogContent sized via the size="3xl" variant (it omits className); the body scrolls (max-h-[70vh] overflow-y-auto, whitespace-pre-wrap preserves the a./1./2. structure).

Testing

  • ExpandableDescription.test.tsx (4 tests): inline render + button, opens dialog with heading + full text, em-dash + no button when empty, and doesn't bubble to the clickable parent row.
  • turbo typecheck --filter=@trycompai/app: clean for the changed files.

Frontend-only, no API/DB changes. Worth a visual check on the preview (open a long NIST requirement).

🤖 Generated with Claude Code


Summary by cubic

Adds a read-only expand-to-read for long requirement descriptions in the app’s Requirements view, so users can read full text without leaving the table. Introduces a shared ExpandableDescription cell used in both grouped and flat tables.

  • New Features
    • Hover maximize button opens a dialog with the full description; header shows "identifier · name".
    • Stops row navigation on click via event propagation control.
    • Uses @trycompai/design-system Dialog and Maximize icon; body scrolls and preserves formatting.
    • No new fetch or backend changes; full text is already on the client.

Written for commit 2988a8e. Summary will update on new commits.

Review in cubic

Long framework requirement descriptions (e.g. NIST SP800-53 PL-2) were
truncated to a single line in the customer app's Requirements view with only a
clipped native tooltip — no way to read the full text. The framework editor
already has expand arrows; this brings the same affordance (read-only) to the
app.

Adds a shared ExpandableDescription cell: truncated inline text plus a hover
maximize button that opens a read-only dialog with the full description. Used
by both the grouped and flat requirements tables. Full text is already on the
client, so no new fetch.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app Ready Ready Preview, Comment Jun 12, 2026 8:21pm
comp-framework-editor Ready Ready Preview, Comment Jun 12, 2026 8:21pm
portal Ready Ready Preview, Comment Jun 12, 2026 8:21pm

Request Review

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 4 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@tofikwest tofikwest merged commit 36afe80 into main Jun 12, 2026
7 of 10 checks passed
@tofikwest tofikwest deleted the tofik/app-requirements-description-expand branch June 12, 2026 20:19
@claudfuen

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.82.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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.

2 participants