Phin Tech docs Red Pen in the store →

UI Audit & Consistency Plan

Status: planned. Based on a visual and code audit of crates/app/src/ across light, dark, and narrow captures (main, description, changes, checks, tabs, settings, palette, keys, pick, mark, leader, composer, and tour).

Goal #

Improve Red Pen's day-to-day polish and make its surfaces follow one coherent system:

  1. Fix concrete visual and interaction defects spotted in rendered frames.
  2. Enforce consistent component roles, scaling (rems), feedback channels, tooltips, accessibility, and copy across every screen and dialog.
  3. Reduce redundant chrome and friction in the highest-traffic workflows (Queue, Description, Changes, Checks, and Settings).

All changes follow the domain lexicon in CONTEXT.md and the GPUI Kit Design Guides.

System Rules to Standardize #

Before touching individual views, align on five invariants:


Phase 1: Visual Defects & Broken Interactions #

Small, self-contained fixes with immediate visible payoff.

  1. Fix Review/Note composer verdict wrapping and add explicit actions

    • Where: crates/app/src/changes.rs (composer, around lines 3177–3245)
    • Problem: Placing the long status sentence, flex_1(), and the three verdict pills in one h_flex().flex_wrap() causes Request Changes to wrap onto a second line on the far left by itself. Regular notes also have no Cancel or Save button, and Reviews have no Cancel button.
    • Fix: Put the verdict/ink choices in a non-splitting h_flex().flex_none() (or dedicated row below the target heading). Add a Cancel button (ghost().small()) to all composer modes and a Save Note (primary().small()) button for non-review notes so mouse users aren't relying on prose instructions.
  2. Fix Tour gutter badge collision and Ask button behavior

    • Where: crates/app/src/changes.rs (render_gutter_marker ~4878–4891, stop_content ~3548–3561)
    • Problem: The size_4() numbered circle (1) collides with the + diff marker on added lines. Inside the tour stop card, the Ask button sits right below an already-visible "Ask about this stop…" textarea, yet clicking it only focuses the textarea instead of sending.
    • Fix: Size/inset the tour gutter badge so it sits cleanly within the gutter without overlapping +/-. Wire Ask to submit the question (disabled when empty) or place a compact send button beside the textarea.
  3. Soften mark_chip visual weight

    • Where: crates/app/src/view.rs (mark_chip, ~4058–4064)
    • Problem: Tag::custom(theme.foreground, theme.foreground, theme.foreground).outline() draws a high-contrast ring that outshouts PR titles and labels, especially in dark mode.
    • Fix: Use Tag::secondary().outline() (matching Topics at ~3600) or border with theme.border and muted/normal foreground text.
  4. Match Settings note preview to real notes & fix inline tour elevation

    • Where: crates/app/src/settings.rs (~2282–2295), crates/app/src/changes.rs (pinned_stop, ~3579–3592)
    • Problem: Settings › Reviewing › Note Text renders a vertical border_l_2() stripe, even though real notes on a diff render a horizontal wavy/straight rule above the note. Meanwhile pinned_stop puts shadow_lg() and bg(theme.popover) on an inline in-flow diff annotation.
    • Fix: Render the Settings preview with the same rule(...) helper used on the diff (so toggling Wavy vs Straight updates the live preview too). Remove shadow_lg() from pinned_stop and use a recessed/bordered inline surface (group_box + border_1()) when pinned, reserving popover + shadow_lg() for floating cards.
  5. Fix Get beta versions disabled state and stale leader hint

    • Where: crates/app/src/settings.rs (~1952–1968), crates/app/src/view.rs (~2944)
    • Fix: Disable Get beta versions when !sparkle, matching the surrounding update controls. Update "(, s l)" to "(Space s l)".

Phase 2: Relative Scaling (rems), Cursors, & Accessibility #

Make every dialog and control survive text zoom (125%–150%) and follow native pointer/a11y rules.

  1. Replace hardcoded px(...) in dialogs, inputs, and layout offsets with rems(...)

    • crates/app/src/about.rs: w(px(340.)), w(px(420.)), max_h(px(420.)) → rems(...) (keep px(96.) for the raster logo).
    • crates/app/src/searches.rs: w(px(360.)), w(px(480.)), max_h(px(320.)), Input::h(px(32.)) → rems(...).
    • crates/app/src/palette.rs: w(px(560.)) → rems(...).
    • crates/app/src/picks.rs, crates/app/src/marks.rs: Input::h(px(32.)) → h(rems(2.)) (or shared helper).
    • crates/app/src/settings.rs: host input w(px(170.)) (~1195) → w(rems(11.)).
    • crates/app/src/changes.rs: rule(...).ml(px(-16.)) (~3306) → .ml(rems(-1.)) to stay locked to pl_4().
    • crates/app/src/view.rs: DatePrompt .pt(px(72.)) (~4753) → .pt(rems(4.5)).
  2. Remove .cursor_pointer() from non-link controls

    • Where: crates/app/src/changes.rs (~3131, 3153, 4630, 4677, 4770, 4904), crates/app/src/conflicts.rs (~1347).
    • Keep .cursor_pointer() strictly on external URL links (view.rs preview-link ~3477 and check-link ~3344), and give those links a subtle external-link icon or rest underline so they read clearly as links.
  3. Add accessible names and proper controls for icon-only actions

    • Convert viewed-box (changes.rs ~4674) from a clickable div into a proper Button::ghost().xsmall() (or Checkbox) with .aria_label(...).
    • Add .aria_label(...) to all icon-only buttons (close-tab, copy-branch, copy-path, split, whitespace, conflict-prev, conflict-next, close-changes) and interactive gutter dots/chips.

Phase 3: Component, Dialog, Tooltip, & Feedback Consistency #

Bring Changes, Conflicts, Description, Settings, and Dialogs onto one shared vocabulary.

  1. Enforce single-.primary() discipline and toggled states

    • changes.rs (~883): Change On the Diff (N hidden) from .primary() to .selected(hidden > 0).toggled(hidden > 0).
    • changes.rs (~1296): Give Tour .selected(self.tour_shown()).toggled(self.tour_shown()), matching Agent.
    • changes.rs (~4544): Demote the heading Review… button to .outline() (or .selected(true)) while the review composer is open so Post Review is the sole .primary() commit.
    • view.rs (~3511): Demote Review Changes in Description from .primary() to default/outline (see Phase 4).
    • conflicts.rs (~1171, 1491, 1545, 1599, 1824, 1881): Ensure at most one .primary() is visible at a time (e.g., when a special-conflict banner or inline editor is active, keep the secondary CTA .outline(), and style Confirm Delete / Delete File with .danger()).
    • settings.rs (~1199): Change Accounts Add from .primary() to .outline(), matching Follow, Exclude, and Show Only These.
  2. Standardize dialog anatomy, validation, and confirmations

    • Extract a small dialog form helper (or shared convention) so picks.rs, marks.rs, searches.rs, pull_actions.rs, validate.rs, and conflicts.rs all include:
      • Visible field labels (text_xs().font_medium().text_color(muted) above inputs).
      • Double-Enter submit guard (add to searches.rs, matching picks.rs / marks.rs / pull_actions.rs).
      • Disabled commit button or inline validation error when required input is empty instead of silent no-ops.
    • Decide whether destructive confirmations (pull_actions.rs merge, conflicts.rs abort & push, and optionally note deletion / account removal) should use themed in-app open_dialog alerts or native window.prompt sheets—and use one consistently across the app.
    • Add either confirmation or undo for irreversible Delete on notes (changes.rs ~3941) and Remove on accounts (settings.rs ~1162).
  3. Unify tooltips and shortcut formatting

    • Move Hinted (or a simpler tooltip_with_key(label, command) helper) to a shared module so conflicts.rs (Previous Conflict ([) → Tooltip::new("Previous Conflict").key_binding(...)), changes.rs file controls, and view.rs buttons all render shortcuts uniformly as Kbd badges.
    • Standardize shortcut prose to one notation everywhere (⇧S, ⌘↩, ⇧↩, ⌥I, ⎋ via shortcuts::symbols / shortcuts::key_for rather than hand-written "Shift-S" or "⌘Return").
  4. Unify feedback & error channels

    • Use typecase::Toast for transient actions currently written into MainView::said / ChangesView::said (copied link/branch/command, review posted, snoozed, dismissed, errors from posting/diff actions).
    • Use Alert::error for Showing::Failed in changes.rs (~4586), matching conversation and checks_pane.
    • Keep Footer focused on persistent queue/background status (refreshing, last refreshed, hidden/excluded counts, specialists running).

Phase 4: Layout, Information Architecture, & Workflow Polish #

Higher-impact UX upgrades that simplify dense screens and improve discoverability.

  1. Auto-select the first pull request on load

    • Where: crates/app/src/view.rs
    • When the queue populates and self.selected is None (and not showing examples/tour setup that explicitly clears it), select row 0 with engaged = false so the middle column opens ready to read without falsely marking it seen.
  2. Move global diff toggles out of per-file headers

    • Where: crates/app/src/changes.rs (file_controls ~4407–4500, heading ~4504–4562)
    • Remove split (Show Side by Side) and whitespace (Hide Whitespace Changes) from every per-file header.
    • Add them once in the Changes toolbar (as icon toggles or inside an expanded View / On the Diff dropdown alongside Whole Files), leaving per-file headers strictly file-scoped (Viewed, Copy Path).
  3. Streamline Changes header chrome & align middle-column spines

    • Where: crates/app/src/view.rs (tab_strip ~1895, switcher ~3191, preview_pane ~3459, checks_pane ~3359), crates/app/src/changes.rs (heading ~4504, tour_offer ~1308)
    • Align the leading edge of tab_strip, switcher, preview_pane, checks_pane, and ChangesView heading to one shared spine (px_4).
    • Reduce vertical stacking in Changes: avoid repeating the PR title when already in the title bar/tab, or fold the tour offer into a compact inline pill/badge on the Tour button so the diff starts higher up.
  4. Consolidate Description actions & enrich metadata

    • Where: crates/app/src/view.rs (preview_pane ~3467–3608, status_badges ~3954–4033)
    • Move Resolve Conflicts… out of status_badges onto the main action row at .small() size so there is only one action bar.
    • Re-evaluate redundant navigation (Review Changes directly under the Changes tab; Open in Browser directly under the clickable repo#num link).
    • Render status icons next to Checks and chips for Marked inside the metadata block so it matches the queue's visual language.
    • Make "1 from bots hidden · b shows them" (view.rs ~3069) a clickable ghost toggle button.
  5. Polish Changed Files & Conflict Files sidebars

    • Where: crates/app/src/changes.rs (~4609–4805), crates/app/src/conflicts.rs (~1286–1437)
    • Match the inset rounded row styling (px_2 container + rounded_md rows) used in the Queue and main Sidebar.
    • Keep the Viewed indicator in a consistent trailing lane.
  6. Upgrade Checks pane, Mark dialog, FilterBar, Keys dialog, and Command Palette

    • Checks (view.rs ~3277–3387): Format commit SHA in monospace; separate check name and state cleanly (e.g., muted status badge instead of test success); bring Details closer or style with an external-link icon.
    • Mark dialog (marks.rs ~63–88): Turn "On it" and "In use" into clickable toggle chips above/below the input.
    • FilterBar (view.rs ~377): Shorten placeholder to "Filter pull requests…" so it never truncates at default queue width.
    • Keys dialog (about.rs ~51–107): Attach .vertical_scrollbar(...), render shortcuts with Kbd badges (matching Welcome), add a quick search input, and give unlisted commands (like window.fullscreen) real display labels instead of raw IDs.
    • Command Palette (palette.rs ~86–145): Put Pull Request / View / File commands before Red Pen app-menu boilerplate (Hide Others, Show All, About Red Pen), and replace "run" placeholder with "Type a command, or # for pull requests…".

Phase 5: Copy, Lexicon, & Upstream Typecase Follow-ups #

In Red Pen (crates/app/src/ and locales/app.toml) #

Upstream in typecase (tracked separately) #


Verification #

After each phase:

  1. just check (formatting, clippy with and without --features screenshot, and all workspace tests).
  2. Capture and inspect just shot frames in both light and dark appearances for every touched screen:
    • Main window (initial launch, selected PR description, PR with conflicts, kept tabs, narrow width REDPEN_WIDTH=860)
    • Changes view (normal diff, review composer, note composer, tour offer, active tour stop, floating vs pinned cards)
    • Checks view
    • Dialogs (cmd-k, cmd-/, cmd-shift-o, m m, cmd-shift-s, pull.comment)
    • Settings window across sections
  3. Spot-check dialogs and Changes at text_scale = 1.25 via REDPEN_SETTINGS to verify rems scaling and zero clipping.