Commit Graph

222 Commits

Author SHA1 Message Date
alan 509d4c624f Render agent questions as markdown
A question's text, its description and its options' descriptions now
use the transcript's markdown renderer (bold, code, lists, links) in
the card's own text styles; tapping an option's formatted description
still selects it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 15:23:24 +00:00
alan 03688f0c1f Merge branch 'worktree-agent-af8d861f87bcc614c'
# Conflicts:
#	app/tool/perf/chat_scroll_fixture.dart
2026-11-25 11:11:38 +00:00
alan a7265038f5 Merge branch 'worktree-agent-a61ceab0eeab6ea76' 2026-11-25 11:11:18 +00:00
alan a3a59adb30 Quieter transcript metadata: day dividers, time-only rows, muted meta rows
- Date once per calendar day: a muted centred divider above each day's
  first timed row (chatDayDividers); rows show only their time ("10:16"),
  with the full date and time kept in the tooltip and semantics. The user's
  time shares the delivery line; a harness notice's time trails its line.
- Activity line and turn chips are secondary: bodyMedium, regular weight,
  onSurfaceVariant (error colour kept for failures), a small chevron_right
  that turns down while its details are open (replaces expand_less).
- Copy / Read aloud: 18 px muted icons; on pointer devices shown only while
  the reply is hovered or an action is focused (also without the gutter);
  touch keeps them visible with a full tap target. The time leads the
  footer so hidden actions leave no gap.
- Settled questions: the question on one line, the operator's answer in
  full on its own line beneath it.
- Meta rows (activity, chips, notices, compaction line) start at the reply
  text's leading edge; turn chips sit in their own column under the answer.
- Scroll fixture: ?timestamps=1 spreads messages over two days.

Row keys are unchanged; the divider joins a row without replacing it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 11:10:51 +00:00
alan 22866ec0ce Chat: fold activity-only rows between messages into one summary line
Tool-only turns, thinking-only turns and background-task notices that sit
between two content rows become one collapsible activity_group row, e.g.
"Ran 7 commands · used 9 tools · 8 background tasks finished · 1 failed",
the failure count in the error colour and never ellipsized. Expanding it
shows the folded rows as they render on their own. A run's task notices
fold into one chip at the newest notice; a notice whose id recurs later is
counted only at its latest position.

Grouping is a pure domain step (groupChatActivity) applied last in the
thread view's row pipeline; group rows list every member id so ChatRowKeys
keeps their identity, unchanged runs return the identical group object, and
the transcript anchor accepts a group's agent-turn ids. The scroll fixture
gains ?bgwork=1 for the shape.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 10:58:25 +00:00
alan a70a4a3c86 Clear pasted and picked attachments from the composer at send
The chips stayed until the server accepted the prompt, a few seconds
after the sent turn already showed the files. They now leave the field
with the text as the prompt goes out; a refusal that gives the composer
its text back restores the same chips.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 10:45:28 +00:00
alan 33874005c4 Question answers: no shaking while typing; Enter sends, Shift+Enter breaks
Typing in a question card's answer box asked the transcript to reveal
the caret on every keystroke; the split, bottom-following transcript
jumped and followed back, so the conversation shook. The request now
stops at the card, which is on screen while the operator types.

A free-text answer now behaves like the chat composer: it grows to six
lines, Enter sends it (desktop and web keyboards) and Shift+Enter
breaks the line; an open IME candidate keeps its Enter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 10:30:30 +00:00
alan 53d8b911a6 Schedule a message for when the usage limit resets
When the open chat's account has an exhausted quota window, a banner above
the composer reads "Usage limit reached · resets at HH:MM" and offers to
send the last message (or the current draft) a minute after the reset, via
chat_prompt send_at. Queued prompts with a future send_at read
"Scheduled · sends at HH:MM" and keep Remove.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 00:59:33 +00:00
alan bfccf39671 Answer Claude questions in your own words, or dismiss them
Claude's question forms now accept a free-text answer beside the
offered options and can be dismissed. A dismissal tells Claude the
operator will reply in the chat instead, the card's button reads
Dismiss, and the composer takes the keyboard so the reply can be typed
at once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 00:02:59 +00:00
alan 50c89976fa Let the composer being typed in take pasted files; free Cmd+V on macOS
A composer outside the active pane (a floating chat window, a side pane)
refused file pastes even while focused, so the field's own text paste
ran instead: a Finder copy pasted its file name and an image nothing.
The focused composer now always takes the paste.

On macOS the Edit > Paste menu item owned Cmd+V and sent paste: to the
native text view, which pastes plain text only and never lets the key
reach Flutter. The item keeps working from the menu but no longer claims
the shortcut, so Cmd+V reaches the composer's file paste.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 00:06:06 +00:00
alan e8baf07bf4 Revert "Measure the running composer border once per size"
Measured at 4K it saved nothing (602 ms -> 621 ms over a streamed reply):
on the web the engine rebuilds every drawn path from its recorded
operations, so keeping the measured outline in Dart does not avoid the
CanvasKit path work. The border needs a path-free drawing instead.

This reverts commit 9d37db59.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 18:36:29 +00:00
alan 42c8346a65 Merge branch 'worktree-agent-a86b9c8a03da895c2' 2026-11-22 18:24:30 +00:00
alan 269d040c18 Merge branch 'worktree-agent-ad9ee94c5e17e5b87' 2026-11-22 18:24:30 +00:00
alan 9be31b8ba0 Re-derive only the live turn's transcript rows per streamed delta
ChatTranscriptRows keeps each message run's rows while the run holds the
identical message objects; applyChatEvent and the controller keep untouched
messages' identity. Shown-item filtering, task-notice groups and row-key ids
are held per row object, and the view reads message ids once per list.
Tests check the incremental path equals a full derivation across streaming,
appends, shown items, cards, turn diffs and prepended pages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 18:24:02 +00:00
alan fa92b9a1a0 Group each transcript row's text into one selectable
The transcript's scroll view kept every text run of every mounted row as
its own selectable and merged newly mounted runs into that list by
comparing global transforms, which dominated slow scroll frames at 4K.
Each row now wraps its content in a SelectionContainer, so the scroll
view orders rows and each row orders only its own runs once on mount.
Cross-row selection and copy order are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 18:21:28 +00:00
alan 9d37db5939 Measure the running composer border once per size
The highlight's outline was rebuilt and measured (computeMetrics) on
every animation frame of a running turn, the largest app cost while a
reply streams (about 600 ms of CPU over 15 s at 4K). The painter now
keeps the measured outline for its size and only extracts the moving
pieces per frame.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 18:19:22 +00:00
alan f8ea50fd70 Paste files and images into the chat composer on macOS
Native hosts reported clipboard-file paste as unsupported, and Flutter's
Clipboard carries text only, so Cmd+V of a Finder file or a screenshot in the
macOS app pasted nothing (or the file name). The macOS Runner now answers a
pipelines/clipboard_files channel with the pasteboard's file URLs, else its
image as PNG; the composer's Cmd+V reads it and attaches the files, falling
back to the pasteboard text when there are none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 20:42:05 +00:00
alan 5425001d82 Send artifacts, runs and pipelines to a new or existing chat
One picker offers a new chat (the saved Open in chat harness and model)
or any open chat. An existing chat gets the reference appended to its
draft and focused, never sent. Artifacts gain the action in their viewer
and gallery; the run and pipeline item becomes Send to chat.
2026-11-13 18:43:14 +00:00
alan 2a182d7f17 Stop background tasks separately from chat turns
Keep Esc and /stop scoped to the foreground turn while exposing an explicit stop-tasks operation for supported chat backends. Add the protocol, server routing, app command, and coverage for task stopping and unsupported harnesses.
2026-11-13 16:47:41 +00:00
alan e5403ae257 Open a run or pipeline in a new chat
The run and pipeline More menus offer Open in chat: a new chat in the
run's (or the pipeline's latest run's) workspace opens on the Chat tab
with a draft naming the run or pipeline and how to inspect or change it.
2026-11-13 12:38:27 +00:00
alan b2736683e7 Merge branch 'main' into pipelines/run-20261112-2323-read-chat-replies-aloud-with-word-highli-e079 2026-11-13 01:29:09 +00:00
alan 6367cce68a Read chat replies aloud with word highlighting
An assistant reply gets Read aloud beside Copy; while it reads it becomes
Pause/Resume and Stop, one reply at a time app-wide. The spoken word is
highlighted in the rendered reply (across multi-part replies) and the
transcript scrolls only when that word leaves the viewport. Reading stops
when its chat closes or is swapped, another reply starts, or the app goes
to the background. Markdown is spoken as sentences; code blocks are
announced as "Code block.".

Speech goes through a SpeechEngine seam with a flutter_tts implementation
(Android, macOS, web; hidden on Linux) and a fake for tests. Settings has
a Read aloud section: a voice picker grouped by language (device language
first, a sample per voice), a rate slider and reset, saved per device.

flutter_tts has no Swift package, so macOS/iOS gain the CocoaPods
integration (Podfiles with the Runner deployment targets); Android
declares the TTS_SERVICE query. The capture fixture gains ?speech=fake.
2026-11-13 01:29:04 +00:00
alan 046de9db4d Use proper phone sheets for chat and Files menus
On phones the chat's More menu, chat list rows and Files entries open a
Material bottom sheet headed by the chat or file, with full-width icon
rows and destructive actions last in the error colour; desktop menus
show icons, a minimum width and destructive actions after a divider.
The chat menu drops Run command and Open chats, keeps a single terminal
entry and lists Close pane last.
2026-11-13 01:14:12 +00:00
alan 1928cfe51b Remember the last Files folder per chat
Persist each chat session's last navigated Files folder, restore it with bounded parent fallback, and forget it when the session closes. Add persistence coverage and capture-fixture support for the reviewed behavior.
2026-11-12 22:56:52 +00:00
alan 3029295b1f Rebind chat file and center-stage shortcuts
Give Cmd/Ctrl+E to the active chat Files panel while preserving terminal behavior, and move Center Stage to the shifted chord. Update shortcut documentation and regression coverage for the new bindings.
2026-11-12 19:52:39 +00:00
alan 677d202ae7 Thicken the running highlight while the composer has focus
The focus ring outlines the pill in the same colour, hiding the 2 px
highlight; draw it 4 px wide over a focused field.
2026-11-12 14:15:48 +00:00
alan ff39114e4f Drop the count badge from the background tasks gear
The caption beside the gear already says how many tasks run.
2026-11-12 14:12:34 +00:00
alan 692ce7ec1a Merge commit '7f31e16bc1f9fe8cd6d0ac0fbe0d509756880aff' into pipelines/run-20261112-1235-gear-icon-for-background-tasks-1cb4 2026-11-12 12:47:40 +00:00
alan a2a9a7e3c1 Replace background task spinner with gear
Use an outlined settings gear with a running-count badge and slow linear rotation while background tasks are active. Preserve reduced-motion behavior, composer sizing, and tooltip coverage with updated focused tests and notes.
2026-11-12 12:43:47 +00:00
alan 7f31e16bc1 Keep only travelling composer border highlight
Remove glow, full-border tint, and reduced-motion overlay so the running composer paints only a short constant-speed arc. Expand focused arc tests and document verification limits.
2026-11-12 12:43:42 +00:00
alan a733a927f3 Finalize reviewed destination and skill changes
Preserve Settings as an independent navigation destination while landing the reviewed notification and skill-management updates. Keep the server and CLI skill contracts versioned and validated so the merged tree can be verified by the delivery gate.
2026-11-12 11:30:17 +00:00
alan 26bb583f10 Refine Settings destination shell integration
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.
2026-11-12 11:21:26 +00:00
alan a1c0d10593 Merge commit '699c3adea55fa1a33801988e0cd588ff610be06a' into pipelines/run-20261112-0201-chat-seen-only-after-real-interaction-7302 2026-11-12 03:31:23 +00:00
alan 6ccced012e Merge commit '40623991e8709e5c1ab3e875b51d4de55f0c20a5' into pipelines/run-20261112-0201-chat-seen-only-after-real-interaction-7302 2026-11-12 03:08:16 +00:00
alan 77db577cd0 Merge commit '40623991e8709e5c1ab3e875b51d4de55f0c20a5' into pipelines/run-20261112-0206-composer-border-shows-the-agent-working-fd87 2026-11-12 02:58:45 +00:00
alan 746e23788d Mark chats seen after user interaction
Prevent passive open, restored, or unfocused chats from clearing notifications. Track qualifying focused interactions and cover passive and active seen-watermark behavior with tests and notes.
2026-11-12 02:25:09 +00:00
alan f3a469c356 Animate chat composer while turns run
Replace the running Stop button with an animated composer border and task spinner. Add Escape, slash-command, and touch-menu stopping paths with focused widget coverage, including reduced-motion behavior.
2026-11-12 02:24:46 +00:00
alan a233733966 Match chat terminal buttons to responsive UI
Remove the duplicate terminal action from narrow shell bars and expose the terminal in open chat bars only where appropriate. Use the shared plain bar-button styling and add focused light/dark responsive widget coverage.
2026-11-12 02:16:23 +00:00
alan 3ce7f7a5dd Expose pane actions in chat list menu
Share the open chat pane menu choices with session rows so list actions use the same handlers and target the selected chat. Add command routing, pane movement support, and focused coverage for wide and narrow layouts.
2026-11-12 01:17:46 +00:00
alan 9551eceaed Complete Material-only APIs and fixtures
Remove obsolete control-family flags and icon metadata across all callers, dead alternate themes and host helpers, obsolete test setup, and the unused icon-font dependency. Preserve native Material Back transitions. Make navigation fixtures independent of update plugins and answer auxiliary shell snapshots so the complete application suite can run deterministically.
2026-11-11 21:55:39 +00:00
alan e1cc3cbf3d Merge commit 'fb8acda1975ed21dea3b03d9ecff2fc03a78f137' into pipelines/run-20261111-1951-material-cleanup-chat-conversation-and-t-b53d 2026-11-11 20:20:19 +00:00
alan fb8acda197 Merge commit 'ec3455e34dbec87376f00d19d9cc944eef51dae7' into pipelines/run-20261111-1951-material-cleanup-terminal-and-chat-shell-1213 2026-11-11 20:15:37 +00:00
alan 214bbbc54f Remove Cupertino branches from terminal chat shell
Keep the existing Material terminal and chat-shell behavior while removing live Cupertino widgets, icon metadata, and alternate-host branches. Retain only the documented optional compatibility parameters until remaining callers migrate.
2026-11-11 20:05:55 +00:00
alan 87a568a7b4 Remove dead Cupertino chat paths
Keep the chat transcript and toolbar on their existing Material behavior while removing obsolete Cupertino-only helpers, arguments, and icon metadata. Preserve compatibility parameters where callers outside this lane still require them.
2026-11-11 20:05:45 +00:00
alan 2d0e33dd67 Unify chat selector menus
Use the permission selector's shared popup and choice-row primitives for model and thinking controls while preserving catalog, search, and next-turn behavior. Remove the obsolete Cupertino model chooser parameter and cover current-model dismissal.
2026-11-11 19:40:26 +00:00
alan d17d356814 Preserve center stage width with file explorer
Report each pane's active explorer width to the center-stage layout so the reading column stays at its preferred width while constrained workspaces still make room for side strips. Restore the allocation when switching panes or closing the explorer.
2026-11-11 18:25:44 +00:00
alan 96de9f5bea Remove Cupertino chat conversation branches
Keep the Material-only conversation implementation while preserving public Cupertino parameters for callers. Narrow affected tests to Material hosts so the dead platform paths are no longer exercised.
2026-11-11 13:11:05 +00:00
alan b6aa820378 Remove Cupertino chat conversation branches
Keep the Material-only chat conversation implementation while preserving public Cupertino parameters for downstream compatibility. Narrow the matching tests to the Material path.
2026-11-11 05:18:29 +00:00
alan 046460b4b6 Merge 2b.2: mode and add-pane pickers as menus on desktop 2026-11-10 23:02:20 +00:00
alan 5fc3c9d3bd Show the mode picker and the add-pane picker as menus on desktop
Phase 2b.2 of docs/plans/floating-windows.md, implemented by pipeline run
303: both use showAppChoiceMenu (a menu anchored to its button on a wide
app, a bottom sheet on a phone).
2026-11-10 23:02:20 +00:00