Skip to content

feat(ui): surface @claude in composers; widen reading measure#74

Merged
sam-powers merged 1 commit into
mainfrom
feat/comment-hints-wider-surface-guards
Jul 10, 2026
Merged

feat(ui): surface @claude in composers; widen reading measure#74
sam-powers merged 1 commit into
mainfrom
feat/comment-hints-wider-surface-guards

Conversation

@sam-powers

Copy link
Copy Markdown
Owner

Three quality-of-life fixes from docs/to-improve/ (specs 10–12). Independent of the @claude-flow PRs (#72/#73) — based on main, non-overlapping hunks.

What & why

Composer hints mention @claude (spec 11)

Both comment composers now advertise the AI affordance in their placeholder — "Add a comment… (@claude to get an AI response)" and "Reply… (@claude to get an AI response)" — replacing the old "Cmd+Enter to post" / "type @claude to ask Claude" wording. The @claude path is now discoverable at the point of writing.

Wider reading measure (spec 12)

Trim --page-padding-x 96px → 64px, giving a ~688px measure (~85 characters). Padding is trimmed, not page width, so the page footprint is unchanged and the wider text can't force horizontal scroll against the fixed comment column. The print block flattens the padding, so exported PDF stays US-Letter.

Remove dead print rule (spec 10)

Drop the now-orphaned .ProseMirror { background-image: none !important } inside @media print. It suppressed the faux page-break gradient removed in #69, which no longer exists.

Tests

  • src/test/styles/pageSurface.test.ts (new): asserts neither .ProseMirror nor .editor-page paints a background-image/linear-gradient (page-break indicator stays gone), that .ProseMirror keeps min-height: 912px, and that the widened measure holds (--page-padding-x ≤ 72, --page-max-width ≥ 816). Each with a negative control proving the assertion can fail. ruleBody matches only page-surface selectors, so a legitimate gradient on a descendant (e.g. the track-changes thread-line) doesn't false-trip.
  • src/test/components/composerPlaceholders.test.ts (new): asserts every placeholder="…" in both composer sources contains @claude, with a negative control.
  • Adds @types/node (devDep) + "node" to tsconfig types so the file-reading guards typecheck. (?raw imports return empty for .css under vitest, so fs is the reliable read.)
  • Full bar green: typecheck, eslint, prettier, vitest (265), cargo fmt / clippy -D warnings / test.

🤖 Generated with Claude Code

Three small quality-of-life fixes from docs/to-improve/ (specs 10–12).

Composer hints (spec 11): both comment composers now advertise the
@claude affordance in their placeholder ("@claude to get an AI
response") instead of the old Cmd+Enter / "type @claude to ask Claude"
wording, so the AI path is discoverable at the point of writing.

Wider reading measure (spec 12): trim --page-padding-x 96px → 64px,
giving a ~688px measure (~85 chars) without changing the page footprint,
so the wider text can't force horizontal scroll against the fixed comment
column. The print block flattens the padding, so exported PDF stays
US-Letter.

Dead print rule (spec 10): drop the now-orphaned
`.ProseMirror { background-image: none !important }` print-suppression
rule — it suppressed the faux page-break gradient removed in #69, which
no longer exists.

Guard tests: two CSS/source-reading guards lock these end-states in.
pageSurface.test.ts asserts neither .ProseMirror nor .editor-page paints
a background-image/linear-gradient (page-break indicator stays gone) and
that the widened measure holds, each with a negative control.
composerPlaceholders.test.ts asserts every composer placeholder mentions
@claude. Adds @types/node (devDep) so the file-reading guards typecheck.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ESi6dnK3Wc1jYRpZN5qfZA
@sam-powers
sam-powers merged commit a6f7405 into main Jul 10, 2026
3 checks passed
@sam-powers
sam-powers deleted the feat/comment-hints-wider-surface-guards branch July 10, 2026 12:57
@sam-powers sam-powers mentioned this pull request Jul 10, 2026
sam-powers added a commit that referenced this pull request Jul 10, 2026
Patch release bundling the fixes from PRs #70#74:

- @claude CLI resolution: working PATH + prefer configured binary (#70)
- desktop: menu stale-closure, window-close capability, deep-link
  window surfacing (#71)
- retry failed @claude replies in place (#72)
- re-run cancelled @claude replies; remove broken new-session (#73)
- surface @claude in composer placeholders; widen reading measure (#74)

Also removes the stray docs/to-improve and docs/plans files that landed
via #70 — those are downstream porting notes, not public-repo content.


Claude-Session: https://claude.ai/code/session_01ESi6dnK3Wc1jYRpZN5qfZA

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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