Skip to content

Redesign step 3 and the Actions panel, and match every export - #23

Merged
nimble-turtle merged 6 commits into
mainfrom
claude/three-column-layout-redesign-d308e8
Oct 18, 2026
Merged

nimble-turtle merged 6 commits into
mainfrom
claude/three-column-layout-redesign-d308e8

Conversation

@nimble-turtle

Copy link
Copy Markdown
Contributor

What changed

Step 3 was a three-column table with the questions only in a header, and four header levels (tier, risk, question, idea) all competing with borders and fills. The Actions panel repeated a truncated risk chip under every action. This reworks both and brings every export along.

Step 3

  • Each risk is a white card with a tier-colored left stripe. Its two questions sit side by side under it (stacked on phones) and line up in height via subgrid.
  • One visual signal per level: tier is colored label text, risk is bold, question is small muted text, ideas are plain text with hover/focus showing they're editable.
  • Starring an idea moves it to the top of its list; the data is reordered so arrow keys and Enter match the screen.
  • Ideas can be dragged to reorder, to the other question, or to another risk. They keep their star, drops are clamped so starred ideas stay on top, and the drop bar always shows where the line will land.

Actions panel

  • Shows only the action, grouped by tier ("For highest risks", ...) in a card with the tier stripe. Other actions get their own group.

Exports

  • Copy buttons, Markdown, rich text, both CSVs and the PDF all follow the new layout and list actions by tier without the source risk.
  • actionGroups.ts is now the single source for which mitigations are actions and how they group; exportColors.ts holds the tier colors for the PDF and clipboard HTML.
  • AGENTS.md gains a rule that exports change in the same commit as the app.

Tokens

  • New rm-{tier}-text (AA on surface and well in both themes) and rm-well.

Verification

  • yarn lint, yarn typecheck, yarn test (637 tests) pass.
  • Checked in the browser in light, dark and phone width; drag verified with pointer events, including cross-risk moves and the clamped drop bar.
  • Rendered a real PDF and inspected the step 3 and Actions pages.

After merge

WEBCAT-sign from main (yarn webcat:sign, or accept the pre-push prompt).

🤖 Generated with Claude Code

The mitigations table had three columns with the two questions only in a
sticky header, so by the third risk people had lost track of which column
meant what, and the risk column wasted a third of the width.

Each risk is now a full-width heading with both questions repeated under
it, side by side from sm up and stacked below that. Empty lines get a
dashed outline and an always-visible "Add an idea" box appears once every
line has text, so an unanswered question visibly asks for input.
Tier, risk, prompt and mitigation each had their own border and
background, so four levels of lines competed for attention. Now each
level gets exactly one treatment:

- Tier: colored label text on a neutral background
- Risk: a white card with a tier-colored left stripe and bold text
- Prompt: small muted text
- Mitigation: plain text, editable affordance only on hover and focus

Adds rm-{tier}-text tokens (AA on surface and well in both themes) and
an rm-well token for the recessed area the cards sit on.
Step 3:
- Starring an idea moves it to the bottom of the starred block at the
  top of its list; unstarring drops it just below the block. The data
  is reordered, not just the display, so arrow keys and Enter still
  match what's on screen. Splitting a starred line puts the new line
  after the block rather than inside it.
- The two questions now share subgrid rows, so when one wraps to two
  lines both lists still start at the same height.

Actions panel:
- Rows show only the action. The truncated risk chip under each one is
  gone; the risk can still be traced back from step 3.
- Actions are grouped under their tier ("For highest risks" and so on)
  in a card with the tier's stripe, matching step 3. Other actions get
  their own neutral group.
- Rows drop their resting border and bold weight, like step 3 lines.

Removes GROUP_HEADER_CLASS, which nothing uses any more.
Each mitigation line gets a grip (shown on hover on pointer devices,
faintly always on touch). Dragging uses the same feel as dragging risks:
tilted preview, dimmed source, insertion bar.

- A line can move within its list, to the other question on the same
  risk, or to any other risk, including one in a different tier.
- It keeps its star wherever it goes, and the drop is clamped so it
  never lands across the destination's starred block: starred lines
  stay at the top of every list.
- The insertion bar shows for every valid target, including a drop
  that leaves the line where it is, so when the clamp stops a starred
  line from going lower you can see where it will actually land.

Pure pieces live in dropPosition.ts (clampStarredBeforeId,
insertionEdge, now shared with dropIndicatorFor) and the pointer
handling in useMitigationDrag.ts.
Actions, in every format: listed without the source risk or its type,
grouped by tier ("For highest risks" and so on) like the Actions panel,
with other actions last under "Other".

Step 3:
- PDF: tier label in its color, then each risk as a white card with a
  tier stripe and its two questions side by side over their lists.
- Rich text: the same per-risk layout. The stripe is a filled table
  cell because Docs and Word keep cell backgrounds but drop borders.
- Worksheet CSV: each risk on its own row, its two questions under it,
  then its ideas, instead of a three-column table.
- Markdown: grouped by tier like the app, with the questions as labels.
- Flat CSV stays a sortable table; its types now read "Reduce
  likelihood" and "Limit harm".

Shared sources so the formats can't drift: actionGroups.ts derives and
groups actions for the panel and every export (replacing three copies
of the derivation), and exportColors.ts holds the light-theme tier
colors for the PDF and clipboard HTML.
Adds an AGENTS.md section listing every export format and its file, the
shared sources to read from, and how to check a real PDF render.
@nimble-turtle
nimble-turtle enabled auto-merge (squash) October 18, 2026 22:28
@coderabbitai

coderabbitai Bot commented Oct 18, 2026

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 12eadfec-573b-46c8-a6f7-07d349f06b63
📥 Commits

Reviewing files that changed from the base of the PR and between fb4d2d4 and ef3a5e2.

📒 Files selected for processing: 37
  • AGENTS.md
  • client/globals.css
  • components/risk-matrix/ActionRow.tsx
  • components/risk-matrix/ActionsAside.test.tsx
  • components/risk-matrix/ActionsAside.tsx
  • components/risk-matrix/CategorizedRiskGroups.columnClick.test.tsx
  • components/risk-matrix/CategorizedRiskGroups.layout.test.tsx
  • components/risk-matrix/CategorizedRiskGroups.tsx
  • components/risk-matrix/DragPreviewLayer.tsx
  • components/risk-matrix/MitigationLineRow.tsx
  • components/risk-matrix/MitigationsTableHeaderRow.tsx
  • components/risk-matrix/MitigationsTablePlaceholder.tsx
  • components/risk-matrix/OtherActionRow.tsx
  • components/risk-matrix/RiskLineRow.tsx
  • components/risk-matrix/RiskMatrix.tsx
  • components/risk-matrix/actionGroups.ts
  • components/risk-matrix/actionsClipboard.test.ts
  • components/risk-matrix/actionsClipboard.ts
  • components/risk-matrix/constants.test.ts
  • components/risk-matrix/constants.ts
  • components/risk-matrix/dropPosition.test.ts
  • components/risk-matrix/dropPosition.ts
  • components/risk-matrix/exportColors.ts
  • components/risk-matrix/matrixCsv.test.ts
  • components/risk-matrix/matrixCsv.ts
  • components/risk-matrix/matrixExport.ts
  • components/risk-matrix/mitigationsMarkdown.test.ts
  • components/risk-matrix/mitigationsMarkdown.ts
  • components/risk-matrix/pdf/MatrixPdfDocument.tsx
  • components/risk-matrix/richTextWorksheet.test.ts
  • components/risk-matrix/richTextWorksheet.ts
  • components/risk-matrix/riskMatrixUtils.test.ts
  • components/risk-matrix/riskMatrixUtils.ts
  • components/risk-matrix/types.ts
  • components/risk-matrix/useMitigationDrag.ts
  • components/risk-matrix/useRiskMatrix.moveSubLine.test.tsx
  • components/risk-matrix/useRiskMatrix.ts
+--------------------------------------------------+
| A bug in this PR is worth two in the repository. |
+--------------------------------------------------+
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

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

@nimble-turtle
nimble-turtle merged commit 92fe5bf into main Oct 18, 2026
1 of 2 checks passed
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