Skip to content

feat(appearance): add a chat width setting - #265

Merged
sambitcreate merged 4 commits into
mainfrom
feature/chat-width-setting
Sep 30, 2026
Merged

sambitcreate merged 4 commits into
mainfrom
feature/chat-width-setting

Conversation

@sambitcreate

Copy link
Copy Markdown
Owner

Summary

Adds an Appearance → Chat width setting with four options: Narrow, Default, Wide, and Full. Before this change the conversation column was fixed at --chat-content-max-width: 52rem.

Source

T3 #11594 (chat width setting).

What changed

  • Shared appearance model (renderer/shared/appearance.ts):
    • New chatWidth: "narrow" | "default" | "wide" | "full" field, defaulting to default.
    • CHAT_WIDTH_OPTIONS and chatContentMaxWidth() map the options to 44rem, 52rem (unchanged), 64rem and none.
    • The field is optional in strict parsing, so older v1 settings and exports still load. An unknown value that is supplied gets rejected.
  • Runtime (appearance-runtime.ts): applyAppearanceConfig writes the chosen width to --chat-content-max-width and data-chat-width on <html>. The token is shared by every .chat-content-column surface (transcript, approvals, BTW card, ask-user composer and composer), so they resize together and stay centered. The dock inset still keeps the Aiden mark clear at Full.
  • Settings UI (appearance-settings.tsx, styles.css):
    • New "Chat width" section with a radio card group that has roving arrow, Home and End keys.
    • Each card shows a miniature column preview.
    • Selection is the label's list-selection fill, with no decorative borders. Keyboard focus uses the neutral --focus-ring.
    • Below 540px of content width the group reflows to two columns.
    • Updated the page description and the Settings search keywords.
  • Docs:
    • docs/settings-design-system.md has a new Chat width section.
    • docs/plans/README.md has a status row.
    • Added a .memory/chat-width-setting.md note.

Desktop only. The Aiden Remote protocol is unchanged, and the iOS and Android appearance stores stay local, so no mobile changes were needed.

Tests run

  • npm run type-check, npm run type-check:e2e, and eslint on the touched files
  • npm run test:settings-design: 61 pass
  • tsx --test on composer, settings-section, appearance-intent, appearance-preview-core and portable-config-core: 96 pass
  • npx playwright test tests/e2e/settings-unification.spec.ts: 6/6 pass. This includes the new behavioral test "chat width setting resizes the transcript and composer together and persists", which:
    • measures the rendered transcript and composer column widths at 1800px for all four options (Narrow < Default < Wide < Full, equal widths, shared center)
    • checks the value in settings.json
    • checks that the Wide width is restored after a relaunch
  • New unit coverage in appearance.test.ts for the default, legacy migration, round-trip and rejection of invalid values.

Follow-ups

  • A command-palette entry, or a shortcut to cycle chat width, if wanted.
  • The mobile clients could offer a similar reading-width preference. It is out of scope here.

🤖 Generated with Claude Code

Appearance gains a Chat width radio group (Narrow / Default / Wide / Full)
persisted as AppearanceConfig.chatWidth. The runtime writes the choice to
--chat-content-max-width, which the transcript, pending approvals, and
composer already share, so they resize together and stay centered.
Legacy settings without the field load as Default (52rem).

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

@pullfrog pullfrog 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 new issues found.

Reviewed changes This review covers the new chat-width preference from its persisted schema through runtime layout and Appearance settings.

  • Preference and migration: AppearanceConfig.chatWidth defaults to the existing 52rem width, accepts legacy settings without the field, and rejects unsupported explicit values.
  • Shared layout: the selected width updates the root CSS variable used by the transcript and composer surfaces while retaining the Aiden dock gutter.
  • Settings UI: the four-option radio group provides keyboard navigation, previews, semantic selection styling, and narrow-container reflow; Appearance search copy is updated.
  • Coverage and documentation: parser and migration cases are tested, and the Playwright test checks rendered widths, alignment, persistence, and relaunch restoration. The settings design docs and project memory are updated; mobile appearance and Remote protocol remain unchanged.

Pullfrog  | View workflow run | Using GPT Luna | 𝕏

@very-hermes-bot

very-hermes-bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator

Hermes Review Bot

Confidence: 5

Engine: agy/gemini-3.8-flash-high
Review mode: full
Head: 09e05986122c71ae3ed05d5dc6db4f84cfe3234c
Generated: 2026-09-30T18:44:06+00:00
Reviews: 1

Summary

Introduces a Chat width preference under Settings → Appearance with four choices: Narrow (44rem), Default (52rem), Wide (64rem), and Full (none). The selection persists as AppearanceConfig.chatWidth and dynamically updates --chat-content-max-width on the document root so that all .chat-content-column surfaces—the message transcript, pending approvals, btw cards, and composer—resize and stay centered together. To maintain alignment when classic scrollbars reserve layout width (e.g. on Linux or non-overlay setups), ScrollArea introduces an opt-in alignFooterToScrollContent prop that narrows the fixed footer by the measured scrollbar gutter. Maintainers should double-check that future chat-adjacent overlays or accessory drawers positioned against the viewport respect the dynamic column width rather than assuming a fixed 52rem container.

Confidence Score: 5/5

Full end-to-end trace completed across the schema, runtime token application, Settings UI keyboard/mouse interactions, container query reflow, ScrollArea gutter compensation, and desktop/mobile isolation contracts.

📁 Important Files Changed
  • renderer/shared/appearance.ts: Extends AppearanceConfig with chatWidth: ChatWidthPreference (default "default"), exposes width mapping helper chatContentMaxWidth(), normalizes missing keys for legacy v1 settings migration, and validates inputs during strict parsing.
  • renderer/lib/appearance-runtime.ts: Binds config.chatWidth to root.dataset.chatWidth and sets --chat-content-max-width inline on <html> upon applying appearance configuration.
  • renderer/components/settings/appearance-settings.tsx: Adds ChatWidthPicker, an accessible radio-card group (role="radiogroup") using existing roving-focus keyboard navigation (handleRadioNavigation), live previews, and debounced persistence.
  • renderer/components/ui.tsx: Adds alignFooterToScrollContent to ScrollArea, dynamically measuring scrollViewport.offsetWidth - scrollViewport.clientWidth via ResizeObserver and offsetting the fixed footer via insetInlineEnd.
  • renderer/main/chat-pane.tsx: Enables alignFooterToScrollContent on the primary conversation ScrollArea.
  • renderer/styles.css: Defines .appearance-width-picker and miniature column previews conforming to design guidelines (no decorative selection borders, neutral --focus-ring focus visible, and 2-column reflow below 540px container width).
  • tests/e2e/settings-unification.spec.ts: Adds end-to-end coverage measuring column geometry at 1800px width across all four options, verifying scrollbar compensation at Full width, and asserting persistence after app relaunch.
  • renderer/shared/appearance.test.ts: Unit tests default configuration, legacy migration, serialization round-trips, and rejection of invalid width identifiers.
  • docs/settings-design-system.md, docs/plans/README.md, .memory/chat-width-setting.md: Documents the design system rules, plan status, and Linux synthetic gutter fixture rationale.

Findings

No findings.

Sequence Diagram

sequenceDiagram
  autonumber
  actor User
  participant SettingsUI as AppearanceSettings (Renderer)
  participant Runtime as appearance-runtime (DOM Root)
  participant MainIPC as IPC Main (settings:previewAppearance)
  participant ConfigStore as configStore (settings.json)

  User->>SettingsUI: Select chat width option (e.g. "Wide")
  SettingsUI->>Runtime: applyAppearanceConfig(nextConfig)
  Runtime->>Runtime: Set --chat-content-max-width: 64rem & data-chat-width="wide"
  SettingsUI->>MainIPC: settings:previewAppearance(nextConfig)
  MainIPC-->>SettingsUI: Broadcast settings:appearance-changed
  Note over SettingsUI,ConfigStore: Debounced 220ms timer fires
  SettingsUI->>ConfigStore: Save nextConfig to settings.json
Loading
[]

Last reviewed commit: 09e05986122c
Reviews (1) · Comment /hermes review to trigger a new review · /hermes review full for full re-review

@pullfrog

pullfrog Bot commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

Pullfrog stalled

The agent stopped emitting events for 125s and was killed by the activity-timeout watchdog. The model produced no output at all before the stall — the request was sent but nothing came back. This is usually transient; re-running often succeeds.

Recent agent stderr
timestamp=2026-09-27T17:36:20.470Z level=ERROR run=26bac5d3 message="stream error" providerID=opencode-go modelID=glm-5.3-flash session.id=ses_f1c1123b7ffeMCE9UXe3V32JhG small=false agent=build mode=primary error.error="AI_APICallError: Go usage limit exceeded"

Pullfrog  | Rerun failed job ➔ | View workflow run | via Pullfrog | Using GLM Flash | 𝕏

@pullfrog

pullfrog Bot commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

Pullfrog stalled

The agent stopped emitting events for 120s and was killed by the activity-timeout watchdog. The model produced no output at all before the stall — the request was sent but nothing came back. This is usually transient; re-running often succeeds.

Recent agent stderr
timestamp=2026-09-27T17:59:34.204Z level=ERROR run=18210c7f message="stream error" providerID=opencode-go modelID=glm-5.3-flash session.id=ses_f1bfa5a82ffe8qiKfcgbyxR0YT small=false agent=build mode=primary error.error="AI_APICallError: Go usage limit exceeded"

Pullfrog  | Rerun failed job ➔ | View workflow run | via Pullfrog | Using GLM Flash | 𝕏

# Conflicts:
#	docs/plans/README.md

@pullfrog pullfrog 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 new issues found.

Reviewed changes This review covers the chat footer scrollbar compensation and its geometry-test follow-up since the previous Pullfrog review.

  • Aligned the fixed chat footer. Added opt-in scrollbar-gutter measurement and a logical inline-end inset to the main chat ScrollArea, keeping its footer aligned with the usable scrollport under classic scrollbars.
  • Strengthened the geometry test. Applied the synthetic gutter after setting the final scrollbar style, then checked transcript/composer alignment across width choices and overflow bounds at Full.

Pullfrog  | View workflow run | Using GPT Luna | 𝕏

@sambitcreate
sambitcreate merged commit 4fc9be9 into main Sep 30, 2026
23 checks passed
@sambitcreate
sambitcreate deleted the feature/chat-width-setting branch September 30, 2026 21:08
sambitcreate added a commit that referenced this pull request Oct 2, 2026
* docs(plans): refresh plan index and status for 0.51.0

Supersedes #274. Moves 22 completed plans into docs/plans/completed/,
refreshes active plan status against main after 0.51.0, records
unlinked shipped changes (#265, #275, #280), and updates .memory notes.

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

* docs(plans): note #220/#223 superseded and Steer moved to #298

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

* docs(plans): record desktop and Telegram Steer shipped in #298

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

---------

Co-authored-by: Claude Opus 5.5 <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.

2 participants