26bb583f10
Keep Settings navigation independent while preserving shell actions and destination-specific state. Add the reviewed chat, run-entry, layout, and regression-test updates needed by the destination behavior.
4.0 KiB
4.0 KiB
Narrow chat header: title priority, settings in More, floating window
Run 415, stage 01-implement. Source only under app/. Not committed, not captured
(ui-review owns captures).
Problem
- At 430px the chat title pill shrank to ~46x44 (a dot):
SegmentedBarlet the non-overflowable selector island take up to 90% of the bar, leaving the title its 10% floor. - The harness mark was squeezed by the title pill's
FittedBoxleading. - In a floating chat window the inner title repeated the window's own title.
Changes
lib/ui/adaptive/segmented_bar.dart: optionaltitleShare. When set, the title keeps that share of the bar (its floor and the actions' ceiling). Default null keeps the old shares for every other bar.lib/features/chat/conversation/chat_thread_header.dart:showTitle(default true). False omits the title pill and folder.- Below 600 logical px (text-scaled,
chatHeaderNarrowWidth): title keepschatHeaderTitleShare= 0.6 of the bar; the model/mode/thinking controls leave the bar for oneChat settingsentry in the More menu, which opens them in a sheet with their labels; overflowable actions (Files, terminal, ...) join More. - Wide (600+) layout unchanged.
lib/features/chat/conversation/chat_thread_view.dart:showTitle: !inWindow(floating window bar names the chat; More keepsChat details); the three controls passshowLabel: true(no effect at 600+, where they already show labels).
Focused results (memwatch, from app/)
- Header, chat-bar and segmented-bar focused set (
chat_thread_header_test,chat_effort_header_test,chat_mode_control_test,chat_model_picker_test,chat_floating_chrome_test,chat_bar_tint_test,chat_pane_presentation_test,segmented_bar_*): 83/83 pass. - Those plus the users of the changed header/keys (chat screen mode/model, floating
pane, list shortcuts, pane move, conversation and shell tests, terminal
bar-action tests,
chat_registration_test), in one final run: 199 pass, 4 fail. The 4 failures aretest/application/chat_registration_test.dart(retap and folded-workspace cases). The same 4 fail on untouched HEAD in a detached worktree, so they are pre-existing and not caused by this change. tool/analyze.sh: clean.
New behavioural tests (chat_thread_header_test.dart, group "narrow title priority
at 430px"): short title whole (no truncation); long title ellipsized with the
title pill >= 60% of the bar; harness mark >= 20px beside the title; More opens
the controls in a sheet; Files moves into More; floating bar shows no title pill.
Affected UI states (for ui-review to capture)
- 430px phone, chat bar: Back | title (>= 60% for long titles) | More. Before: Back | ~46px title dot | model | mode | Files | More.
- 320px at 2x text: same shape (Back | title | More).
- More > Chat settings: sheet with model, mode and thinking controls, labelled.
- Floating chat window (any width): bar has no inner title; More has Chat details.
- 600px and wider: unchanged.
Test expectation changes (narrow behaviour the task asked to change)
chat_thread_header_test.dart: narrow bar expects the settings entry, not the selector island/icons; wide branch keeps the old checks.chat_floating_chrome_test.dart: at 560px Files is in More (not in the bar).chat_model_picker_test.dart,chat_screen_model_test.dart,chat_screen_mode_test.dart: phone tests open More > Chat settings to reach the model/mode controls. Expected values are unchanged;_shownis now async.
Limitations
- Phone users reach model/mode/thinking through More > Chat settings (two taps, was one). Files is also in More on phones. The 60% title floor needs this at 430px with 48px touch targets.
- The settings sheet holds the controls as built when opened. Server changes while it is open show after reopening; each control's own accepted change updates at once.
- Harness mark size is asserted at >= 20px; no pre-change baseline was run for that test.
- Not verified on a device or in a browser; nothing captured here.