Commit Graph
62 Commits
Author SHA1 Message Date
jpmschweitzerandClaude Opus 4.8 6d0ebab721 chore: adopt Dart 3.9 toolchain — honest floor + tall-style reformat (T-353)
Raise the declared minimums in pubspec.yaml to what our deps already
require: Flutter >=3.35.0 / Dart >=3.9.0 (was 3.19.0 / 3.5.0). alchemist
0.12 needs Flutter 3.32; Dart 3.9 first ships in Flutter 3.35, so 3.35 is
the binding floor. Pin the exact build toolchain in .fvmrc (Flutter
3.44.1).

Moving to the Dart 3.9 language level switches `dart format` to the new
"tall" style and enables two new lints. This commit is the resulting
mechanical churn, isolated from any behaviour change:
  - whole-tree `dart format` reformat (tall style)
  - `dart fix` for unnecessary_underscores + use_null_aware_elements

No runtime behaviour change; `make test` green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-11 12:11:53 +02:00
jpmschweitzerandClaude Opus 4.8 36f4561ca1 expand PATH on Linux so desktop-launched clide finds pql (T-347)
A desktop launcher gives the app a minimal PATH (e.g. /usr/bin:/bin) with
no ~/.local/bin, where pql installs — so _findOnPath('pql') returned null,
clide spawned the literal 'pql', and Process.start failed with ENOENT;
the pql pane errored. The PATH re-expansion that re-adds ~/.local/bin +
/usr/local/bin ran on macOS only; Linux GUI launches hit the same wall.

Extend it to Linux (homebrew dirs stay macOS-only). Extract the logic
into a pure expandToolPath() so the platform gating is unit-tested.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 19:22:12 +02:00
jpmschweitzerandClaude Opus 4.8 3134a0ac52 tickets: backlog relevance sweep (sub-T-100)
Swept the 19 backlog tickets with ids below T-100 for relevance against
the current codebase + governance.

Cancelled (obsolete):
- T-26 web-tree-sitter — contradicts the desktop-first guardrail
- T-60 workspace trust prompt — premature; third-party ext loading unshipped
- T-40 PRs tab — unscoped, no extension, data path undecided

Annotated (stale text / mixed state, work still valid):
- T-25, T-27 — app/ path prefix stale post-D-56
- T-8 — mixed Tier-6 completion (theme-picker done, settings-ui stub)
- T-55 — split: tmux persistence done, OS tray still a stub
- T-41 — likely superseded by canvas epic (T-317/D-91)
- T-67 — reframe from one-time audit to coverage ratchet
- T-81 — T-79/T-80 done, #21 obsolete, ~7 items remain

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 17:18:11 +02:00
jpmschweitzerandClaude Opus 4.8 adbd8e285a harden SettingsStore against notify-after-dispose for fire-and-forget writes
set() doesn't await its file write, so a write in flight when the store is
disposed (app shutdown, or a closing test) would assert on a disposed
ChangeNotifier. Skip the post-write notify once disposed via a _disposed guard +
_safeNotify. Surfaced by the T-293 theme-persistence test flaking under the
loaded parallel run; also the correct behaviour for graceful shutdown.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 18:05:53 +02:00
jpmschweitzerandClaude Opus 4.8 5c6674d739 persist the chosen theme per repo across loads (T-293)
ThemeController.select() applied live but never persisted, so every restart reset
to the first bundled theme. Add wireThemePersistence (facade): on theme change
write app.theme (global default) + project.theme (the open repo's
.clide/settings.yaml); on settings change — notably when a repo opens and its
project values load — restore the most specific saved theme (project then app).
The name encodes the -hc variant so high-contrast persists; an unknown/removed
theme is ignored so a stale value can't wedge startup.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 17:36:04 +02:00
jpmschweitzerandClaude Opus 4.8 0f326dc1e4 format log_ring_test.dart helper to one line
The committed version of the _rec() helper violated dart format (it was
split across two lines under the repo's wide line length). Bring it into
compliance so make format / make test stay green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 12:49:18 +02:00
jpmschweitzerandClaude Opus 4.8 826395481c make sidebar filter boxes CLI-addressable via the MessageBus (T-270)
The sidebar/dock filter fields (the shared ClideFilterBox) had no CLI
peer — a one-way, UI-only affordance that broke D-6 parity. Add the
drive+observe verb `clide ui filter <address> [<text>]`, routed entirely
through the kernel MessageBus pub/sub so a box reacts to a published
message identically whether the trigger was a UI keystroke or the CLI —
keeping extensions first-class (no dispatcher→widget wiring).

- ClideFilterBox gains an `address`; when set it listens on `filter.set`
  for its address and republishes its value on `filter.state`. Null
  address keeps the box a kernel-free UI widget.
- FilterStateCache (new kernel service) caches the latest `filter.state`
  per address — the bus has no retention, so this backs the observe-half.
- ui.filter: with text → publishes `filter.set` (drive); without →
  reads the cache (observe). Honest toolError when there is no live UI.
- Address every box: decisions/tickets/files/git/output/problems panes,
  the four search boxes, and the pql search/query/markdown inputs.

Addresses are the ids from `clide pane list` (e.g. decisions.panel).
settings.json: allow the `clide` CLI + relevant skills.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 12:44:40 +02:00
jpmschweitzerandClaude Opus 4.8 38058c17f5 add LogRing — bounded retention for Logger records (T-54)
The Logger only live-broadcasts; an output panel opening late would see no
history. LogRing is a drop-oldest sink (default 2000 records) that keeps the
recent window plus per-source and per-level bookkeeping — distinct sources
for the panel's filter dropdown, level counts for the status-bar health
badge. Flutter-free; the dock UI wraps it. First slice of the D-87 dock.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 23:10:07 +02:00
jpmschweitzerandClaude Opus 4.8 51cfa15c78 distinguish a dev-tree clide from a packaged install (T-256)
CliInstaller.inspect() gains a devTree state: when `clide` on PATH resolves
to a dev-tree build artifact (native/<plat>/clide, the Makefile's
CLIDE_CLI_BIN output) it's classified separately from a packaged install
rather than silently treated as "installed". needsInstall stays false for a
dev build (it's intentional on a checkout, not a reinstall prompt), and the
launch-time check surfaces it as an info note. install() flags fromDevTree +
notes it in the result message when the copied source is a dev build.

Closes the last open child of the T-208 "give Claude hands" initiative.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 21:53:01 +02:00
jpmschweitzerandClaude Opus 4.8 f63ab521f1 cover the cli-install env fallback and stale-GUI activation paths
Adds the two missing cases that left lib/kernel/src/cli_install.dart:74
(default-environment constructor branch) and the builtin extension's
stale-GUI activation warning uncovered.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 12:59:48 +02:00
jpmschweitzerandClaude Opus 4.8 562c17c06d add in-app "Install clide command in PATH" affordance (T-212)
A command-palette / `clide` CLI verb (`clide.installCli`) copies the
bundled C client into ~/.local/bin, VS Code "Install code command" style,
so a user who runs the app without `make install` can still reach the CLI
from a shell. On launch the app detects when `clide` is missing from PATH
or resolves to a stale symlink into the Flutter GUI bundle (the dogfood
footgun: a bare `clide` launched a second app instead of querying the
socket) and notifies with a pointer to the command. `make build` now ships
the C client inside the app bundle so the affordance can self-install from
it; `make run` points it at the dev-tree client via CLIDE_CLI_BIN.

Detection and the copy live in the Flutter-free CliInstaller
(kernel/src/cli_install.dart) so they run under unit tests without a real
install.

Closes epic T-209 (ship the clide CLI on PATH).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 12:05:41 +02:00
jpmschweitzerandClaude 0e85f7f5e7 fuzzy-match + recency-rank the command palette
Completes the command-palette acceptance: the filter is now a
subsequence fuzzy match (was substring), and recently-invoked commands
float to the top and break score ties. The subsequence matcher is
extracted to a shared fuzzy helper so the palette and quick-open file
finder use one implementation instead of a private copy each.

Pinned commands and cross-session recency persistence are left as a
follow-up (they need a pin affordance + settings storage).

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-06 09:40:56 +02:00
jpmschweitzerandClaude Opus 4.8 1f09abcfd7 add toast notification system (T-50)
Non-modal operation-feedback toasts, bottom-right: a ClideToast card per
severity (success/warning/error/info), auto-dismiss (errors linger), queue
with a visible cap, slide+fade in, manual dismiss, live-region a11y.

ToastService is a MessageBus consumer — components raise a toast by publishing
to the 'toast' channel (publishToast helper), so emitters stay decoupled from
the UI. GitController's push/pull are the first emitters. ToastOverlay mounts
in the app-root Stack.

Also adds comprehensive GitController coverage: importing it for the toast
emitter test first pulled the whole file into the coverage denominator, so the
controller is now tested end to end (status/stage/commit/stash/push/pull).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 23:14:42 +02:00
jpmschweitzerandClaude Opus 4.8 62c5b88835 root-cause T-122 + restore 95% coverage; fix recents-row overflow
T-122: WelcomeView "hangs when recents are non-empty" was not a render/marquee
bug — SettingsStore.set does real file I/O, and awaiting settings.set +
loadRecents inside a testWidgets body runs it in fake-async, trapping the
completion so the await never returns. Fix: seed via tester.runAsync. Un-skip
the welcome recents test; add render/sticky/open-recent coverage.

Coverage: new test/app_test.dart covers the app shell (RootLayout, slots,
rails, spines, editor split, hat bar, intents, keymap, project switcher +
dialogs); welcome recents + events/types fill the rest. Total 92.04% -> 95.13%.

Also fixes a real bug found en route: the recent-project row (welcome +
switcher) overflowed instead of ellipsizing a long path (T-122).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 15:24:37 +02:00
jpmschweitzerandClaude Opus 4.8 8682564903 add clide status orientation snapshot; close Epic C (T-221)
clide status returns a one-shot snapshot for an orienting agent: the
workspace root, a git summary (branch/ahead/behind/clean/counts), the
active editor buffer + selection, the read-only readers' viewed docs
(new ReaderNavRegistry.currentByReader, the T-220 fold), focusedFile,
the live view-pane list (T-219), and the layout (slots + visibility +
focus mode). Previously 'status' was an unknown command (exit 3).

The verb handler (status_command.dart) is a thin Flutter-free wrapper;
the snapshot is assembled in main.dart where the live kernel + subsystem
state is in scope, with readerNav captured post-boot. Composite shape is
verified live; the pieces are unit-tested.

Closes T-221 and T-218 (Epic C) under T-208 'Give Claude hands' --
the observe half of D-6 parity is now in place.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 13:51:15 +02:00
jpmschweitzerandClaude Opus 4.8 be06b94754 register live GUI panes into clide pane list (T-219)
Per D-6 parity / D-83, make the kernel tabs the user sees (Claude,
Files, Editor, viewers) visible to the CLI. The PTY-backed PaneRegistry
can't model widget panes, so rather than mirror state (and risk drift),
pane.list snapshots the kernel PanelRegistry + LayoutArrangement at
request time via an injected view-pane source.

New Flutter-free ViewPane value type + snapshotViewPanes kernel bridge;
the daemonClientFactory now passes the PanelRegistry through so the
dispatcher can read it. pane.list merges PTY panes (source absent) with
UI tabs (source: ui, with slot/title/active/visible).

Acceptance (GUI-open: pane list enumerates live panes) needs a running
app to confirm end-to-end; unit-tested at the snapshot + dispatch level.

Closes T-219 (under T-218 / T-208 'Give Claude hands').

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 12:49:57 +02:00
jpmschweitzerandClaude Opus 4.8 adcc79c9a5 cover Vim edit-ops and extension edge branches
Lift line coverage back over the 95% floor after the Flutter 3.44.1
merge nudged it to 94.99%. Adds tests for the changeWord/no-op-edit/
empty-paste/word-motion-edge branches in vim_edit_ops, the lone-key
flush path in SequenceMatcher, and the keybindings-ui / vim extension
identity + deactivate paths.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 10:48:27 +02:00
jpmschweitzerandClaude Opus 4.8 ba304a95e6 add keymap multi-chord sequences and a stateful matcher
T-205, the resolver foundation for Vim motions (dd, gg, dw, ciw) and
repeat counts (5j). KeymapBinding now holds an ordered chord sequence
(length 1 for the common single-chord case); `keys:` parses a space-
separated spec into that sequence (D-82). Keymap.resolve keeps the
single-chord fast path; a new stateless Keymap.match answers
exact/prefix/none for a pending buffer.

SequenceMatcher wraps that query with a pending buffer, a repeat-count
prefix (leading digits, 0 excluded since it's the line-start motion),
the d-vs-dd timeout case (flush fires the buffered exact), and broken-
sequence recovery (discard, restart on the last chord). It is headless —
no keyboard reads, no event swallowing — so the editor (T-206) can drive
it from Focus.onKeyEvent and act on the result.

Also drops a stray unused import in the Vim indicator test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 21:11:59 +02:00
jpmschweitzerandClaude Opus 4.8 4aa24a9898 fix dead default keymap from undefined focus intents
default.yaml bound tab/shift+tab to focus.next/focus.previous, intent
ids absent from builtinIntents. parseIntentId returns null, so
KeymapLayer.fromYaml throws — and KeymapService.load catches that and
sets _preset = null. The whole default preset was silently dropped at
boot: palette, quick-open, find-in-files, and zoom bindings never fired.

It went unnoticed because every keymap_service_test injects a synthetic
bundle; the shipped asset was never parsed in a test. Add focus.next ->
NextFocusIntent and focus.previous -> PreviousFocusIntent (Flutter-
provided, for correct Tab widget traversal), and a test that reads every
real assets/keymaps/*.yaml through the loader so a future typo fails CI
instead of disabling the keymap.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 20:50:49 +02:00
jpmschweitzerandClaude Opus 4.8 f83e52b818 reader pin UX: push-pin icon, toggle, left/right split
Per user feedback on the reader action bar: use the push-pin glyph (not
the chain/link), make the pin button toggle the pinned state (tap to pin
current, tap again to unpin) via ReaderNav.togglePin, and split the
layout so the pin/unpin toggle sits on the left while jump-to-pin joins
the navigator (back/forward) on the right — left toggles, right
navigates. The action button gains an active (accent) state for the
pinned indicator.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 13:31:51 +02:00
jpmschweitzerandClaude Opus 4.8 0eb7b0df2f fix decision first-click + editor reveal via retained reader nav
Two reveal-on-open bugs:

Decisions opened only on the second click (T-196): the detail view
subscribed in didChangeDependencies, which runs after the tab is
revealed, so the broadcast 'selection' that triggered the reveal was
already gone. Hoist the back/forward history out of per-view State into
a retained per-reader ReaderNav (kernel ChangeNotifier in a
ReaderNavRegistry, D-81). The nav records selections, emits 'load' (the
single channel readers display from), and survives mount/unmount — the
reader grabs nav.current on mount, so the first selection lands. Both
the markdown and decisions readers move to this model; the per-view
ReaderHistoryMixin and the markdown post-frame forward hack are gone.

The editor pane never opened (T-197): EditorExtension contributed a
workspace tab but nothing activated it on editor.open. Add an activate()
that reveals the tab on editor.opened / editor.active-changed; the
view's hydrate() pulls the active buffer on mount.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 12:45:48 +02:00
jpmschweitzerandClaude Opus 4.8 f96c565acd add find-in-files sidebar panel + Ctrl/Cmd+Shift+F
The find-in-files UI on top of the search.grep engine. A
FindInFilesController drives search.grep, accumulates streamed
search.match events (scoped to the active searchId, stale ids
ignored) grouped by file, and opens a match in the editor at its line.
The SearchPanelView contributes a sidebar tab: a debounced query box,
regex + case toggles, include/exclude glob fields, and a grouped
results list with the matched span highlighted.

findInFiles.open (Ctrl/Cmd+Shift+F) reveals and activates the search
tab.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-31 20:53:50 +02:00
jpmschweitzerandClaude Opus 4.8 0c7a6e86d5 add quick-open fuzzy file finder (Ctrl/Cmd+P)
A file picker overlay over the whole workspace, distinct from the
command palette. QuickOpenController holds the file list + a
subsequence fuzzy filter; the overlay loads the list via files.walk on
open, shows RecentFilesService entries on an empty query, and opens the
selection through a shared openWorkspaceFile helper (.md → markdown
reader bus, else editor.open) that the files panel now also routes
through, so recents stay in sync from every open site.

Bound to ctrl+p / meta+p with `when: !palette.open` so it never
collides with the palette's ctrl+p navigation; in-overlay arrows/enter/
escape reuse the palette's keymap-driven model via quickOpen.* intents.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-31 20:19:21 +02:00
jpmschweitzerandClaude Opus 4.7 2fd911d01d auto-load extension i18n catalogs; add the missing tab-title ones
Five builtins (tickets, decisions, git, pql, problems) declared a
localized tab title but shipped no catalog and weren't in the hand-kept
preload list, so each logged "namespace not registered" on boot.
ExtensionManager now loads the i18n namespace of every localized
TabContribution when its extension activates — no manual list edit for a
new tab — and the five missing en_US catalogs are added.

T-155.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 16:49:56 +02:00
jpmschweitzerandClaude Opus 4.7 478cff6050 add ClidePane primitive + focus-driven status-bar slot
Replace the MessageBus-based pane-context slot with a focus-driven one.
Panes keep their status widget locally; the FocusTracker holds the
focused pane's widget (activeStatusWidget) and ClidePane conveys it to
the shared slot only while its contribution is focused, re-conveying on
change and clearing on blur. The status-bar item just renders
focus.activeStatusWidget, height-clamped and marquee-scrolled when it
overflows. Removes the publish/subscribe race the bus version had.

T-150.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 11:23:30 +02:00
jpmschweitzerandClaude d7c935977e fix daemon-not-connected race on startup
The socket-loopback DaemonClient (T-127) raced the UI on first launch:
panels queried before the socket finished connecting and cached a
"daemon not connected" error, and the Claude pane's spawn gate tripped,
leaving an empty terminal. Three fixes in the startup/connection path:

- DaemonClient.request() now waits briefly (5s) for an in-flight
  connection instead of failing instantly, gated on _started so a
  never-started client still fails fast. start() sets _started
  synchronously so the gate is armed before the UI builds.
- swapIpcServer reuses the live server when the opened project matches
  the workspace it already serves, instead of tearing it down — the
  project-open flow fired right as the Claude pane spawned, dropping
  the connection mid-spawn.
- _connect bails if already connected, so start() arming the reconnect
  loop and swapIpcServer's reconnectAt can't open a second socket
  (which had been double-delivering events).

This whole orchestration had no automated coverage — integration tests
stub a FakeDaemonClient. Adds a real wait-then-connect client test.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-22 15:39:59 +02:00
jpmschweitzerandClaude 7764c896fe add panel.resize CLI verb (T-119)
test / unit + widget + golden + a11y (push) Failing after 36s
test / integration_test (xvfb) (push) Has been skipped
test / bundle smoke (xvfb 5s) (push) Has been skipped
test / daemon subprocess + web WASM smoke (push) Has been skipped
test / dart doc (lib API) (push) Failing after 28s
The keyboard half of panel resizing landed in T-111 (arrow-key
splitters); this completes D-6 user/Claude parity with a CLI verb now
that T-99's IPC dispatch path exists. `clide panel resize <slot> --to N`
sets an absolute pixel size, `--by N` nudges relative to current, and
the reserved `editor` slot drives the editor/bottom-panel split ratio.

The handler lives in panel_commands.dart and stays Flutter-free (so
test/daemon/ keeps running under `dart test`) by talking to an abstract
PanelResizer; the kernel bridge in panel_resizer_kernel.dart wraps
LayoutArrangement and reuses T-111's bumpedSlotSize so the CLI's
relative deltas honour the same right-edge sign-flip as the drag/arrow
handlers. Arguments are lifted from both the direct call shape and the
argv-translator's positional/flags shape pending the typed schema in
T-120. The daemonClientFactory now receives the LayoutArrangement so
the dispatcher can reach it.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-20 09:00:03 +02:00
jpmschweitzerandClaude 70c293b163 T-127: replace InProcessClient with socket loopback
test / unit + widget + golden + a11y (push) Failing after 2m16s
test / integration_test (xvfb) (push) Has been skipped
test / bundle smoke (xvfb 5s) (push) Has been skipped
test / daemon subprocess + web WASM smoke (push) Has been skipped
test / dart doc (lib API) (push) Failing after 29s
Fourth slice of T-99. The UI's DaemonClient now talks to its own
IpcServer through the same per-workspace Unix socket the C `clide`
client uses — one transport, one wire contract, no second path
through the dispatch tree.

Changes:
* lib/kernel/src/ipc/in_process.dart deleted. Nothing imports it.
* DaemonClient.socketPath becomes mutable + new `reconnectAt(path)`
  method swaps an active client onto a different socket without
  restart. Project switch in main.dart uses it — the dispatcher
  + IpcServer are rebuilt for the new workspace, and the client
  reconnects to the new path.
* main.dart's daemonClientFactory now builds a real DaemonClient
  pointed at workspaceSocketPath(workRoot); swapIpcServer kicks
  off server.start() then client.start() in sequence.
* lib/test_app.dart's pane.spawn smoke test uses dispatcher.dispatch
  directly instead of InProcessClient — same coverage, no dead-end
  import.
* DaemonClient client_test gets a reconnectAt round-trip test.

T-128 (delete IsolateClient + Backend + backend_entry.dart) unblocked.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-19 12:03:44 +02:00
jpmschweitzerandClaude 8697f79a0a restore coverage floor to 95; cover ground elsewhere
test / unit + widget + golden + a11y (push) Failing after 30s
test / bundle smoke (xvfb 5s) (push) Has been skipped
test / daemon subprocess + web WASM smoke (push) Has been skipped
test / integration_test (xvfb) (push) Has been skipped
test / dart doc (lib API) (push) Failing after 1m1s
Reverts the D-66 amendment + the floor drop to 94 from 78b38e3 — both
were unilateral and outside my call to make. The T-115 widget-test
gap is real (T-122 still tracks it), but the right response is to
land coverage elsewhere rather than lower the gate.

Adds:
- intents_test.dart — parseIntentId for every builtin id + the
  `command:<id>` prefix path.
- session_naming_test.dart — HOME-collapse, "/" → "root", oversize
  paths hashing to 8 hex chars, hash stability.
- project_test.dart — onProjectOpen await branch in `open()`.
- settings_test.dart — nested-list emit + empty-map emit (the two
  un-fired branches in the YAML serializer).

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-18 12:06:08 +02:00
jpmschweitzerandClaude 7046bf9c70 picker-first startup with per-project sticky override (T-115)
Boot used to auto-open app.lastProject and fall back to the CWD; new
default is the welcome screen as the project picker. Sticky-open is
opt-in: a checkbox on each recent-projects row toggles a
startupSticky flag, and clide auto-opens iff exactly one row has it.
Two-or-more, or none, ⇒ picker (unambiguous user intent).

RecentProject gains the boolean (persisted in app.recentProjects);
ProjectManager exposes stickyProjectPath, openStickyOrNothing,
setStickyStartup, isStickyStartup, and preserves the flag across
reopens.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-18 10:26:12 +02:00
jpmschweitzerandClaude 683c90d0af cover vertical-axis + custom-slot branches in drag_resize_test
test / unit + widget + golden + a11y (push) Failing after 38s
test / integration_test (xvfb) (push) Has been skipped
test / bundle smoke (xvfb 5s) (push) Has been skipped
test / daemon subprocess + web WASM smoke (push) Has been skipped
test / dart doc (lib API) (push) Failing after 1m2s
Two more structural assertions to claw back the coverage gap the
keyboard-wiring lines opened up — the vertical-axis shortcut map and
the slot-name fallback label branch were both uncovered.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-18 09:47:37 +02:00
jpmschweitzerandClaude 9249b1511d extract bumpedSlotSize for direct test coverage (T-111)
Pulled the slot-relative sign flip out of `_DragResizeHandleState._bump`
into a top-level `bumpedSlotSize` helper so the direction logic (the
bug-prone half) gets unit tests without piping through the keyboard
focus machinery. Adds a slot-label assertion for the context-panel
branch.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-18 09:45:47 +02:00
jpmschweitzerandClaude 5d1237501c panel splitters get keyboard parity and Semantics (T-111)
Drag handles for sidebar / context / editor split were pure
pointer-Listeners — no Tab focus, no arrow-key adjust, no Semantics.
Each now wraps in a FocusableActionDetector with arrow shortcuts (10
px fine / 50 px coarse for the column handles, 2% / 10% for the
editor split) and a slider Semantics node that announces the current
size. The CLI verb half is split out as T-119 and waits on T-99.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-18 09:43:56 +02:00
jpmschweitzerandClaude f113cb5efd re-flow text_zoom_test.dart per dart format
test / unit + widget + golden + a11y (push) Failing after 28s
test / integration_test (xvfb) (push) Has been skipped
test / bundle smoke (xvfb 5s) (push) Has been skipped
test / daemon subprocess + web WASM smoke (push) Has been skipped
test / dart doc (lib API) (push) Failing after 1m2s
Pre-push hook split the cascaded `..increase()..increase()` chain
onto separate lines; landing the formatter's choice.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-18 09:05:37 +02:00
jpmschweitzerandClaude 044d1b2ff1 lift text-zoom into kernel, surface it in the palette (T-114)
test / unit + widget + golden + a11y (push) Failing after 30s
test / integration_test (xvfb) (push) Has been skipped
test / bundle smoke (xvfb 5s) (push) Has been skipped
test / daemon subprocess + web WASM smoke (push) Has been skipped
test / dart doc (lib API) (push) Failing after 1m1s
Workspace text-zoom (Ctrl +/-/0) was local state on _RootShellState,
reachable only via the keymap intent path. Lifted to a kernel TextZoom
ChangeNotifier so the new `view.zoomIn/Out/Reset` palette commands
mutate the same number the keymap does — closing T-114's "discoverable
in the palette" item.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-18 09:04:43 +02:00
jpmschweitzerandClaude Opus 4.7 7937da1734 panel-to-panel focus traversal via F6 / Shift+F6 (T-105)
Each SlotHost now owns a FocusScopeNode and registers it with
FocusTracker on mount. The render is wrapped in
FocusScope + FocusTraversalGroup so Tab stays within a panel and
slot-level focus is observable.

When a slot's scope gains focus, SlotHost pushes
(slot, activeContributionId) to FocusTracker — this collapses the
parallel-tracker model the consultant flagged. FocusTracker keeps
its setActive surface for explicit callers (palette, etc.) but
slot-scoped tab activation feeds it automatically.

Two new intents, two new bindings:
  FocusNextPanelIntent     → F6
  FocusPreviousPanelIntent → Shift+F6
(VS Code convention; preset YAML.)

The cycle skips slots without a registered scope, so a layout that
hides the context panel doesn't strand focus on a missing target.
Fewer than two registered → no-op.

SlotHost split into a stateful outer (scope + registry) and a
stateless `_SlotBody` (the existing slot-specific rendering),
keeping the build straightforward.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 21:56:35 +02:00
jpmschweitzerandClaude Opus 4.7 12e0509fa3 keyboard-operable ClideTappable + palette nav (T-100)
test / unit + widget + golden + a11y (push) Failing after 28s
test / integration_test (xvfb) (push) Has been skipped
test / bundle smoke (xvfb 5s) (push) Has been skipped
test / daemon subprocess + web WASM smoke (push) Has been skipped
test / dart doc (lib API) (push) Failing after 1m5s
Plug widgets into the keymap layer landed in T-117.

ClideTappable:
  - Wrap in `Actions(ActivateIntent → onTap)` outside a `Focus` so
    dispatch from the focused context walks up and hits the action.
  - Add a focus ring via `tokens.globalFocus` (DecoratedBox foreground
    overlay, transparent border when unfocused, no layout shift).
  - Disabled (`onTap == null`) skips focus traversal and shows the
    forbidden cursor.

ClidePalette:
  - Register Actions for the four palette intents
    (selectNext / selectPrev / accept / dismiss).
  - Publish `palette.open` scope flag via `KeymapService.setScopeFlag`
    so when-clauses can scope future bindings to "palette only".
  - Highlight the selected row with `listItemSelectedBackground`;
    scroll it into view on nav.
  - `PaletteController` grows `selectedIndex` + `selectNext` /
    `selectPrevious` / `acceptSelected`; index resets on open /
    filter change.

Intents.dart drops the `ClideIntent` base — `ActivateIntent` and
`DismissIntent` come from Flutter; clide owns the palette and text-
scale and command-bridge subclasses. `parseIntentId('activate')` →
Flutter's class; same for dismiss. Widget code uses the canonical
Flutter Intent types where they fit.

App root grows a PaletteOpenIntent action that calls
`services.palette.open()`, completing the ctrl/cmd+shift+p path
end-to-end.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 21:48:03 +02:00
jpmschweitzerandClaude Opus 4.7 798ba524f1 keystroke mapper layer — intents, presets, when-clauses (T-117)
Build the upstream of every keyboard-driven feature: widgets bind
to typed Intents, the keymap resolves chord+context to an Intent,
and Flutter's Actions dispatches. The widget never touches a key.

Layers (low → high precedence):
  1. preset YAML in assets/keymaps/<preset>.yaml
  2. extension-registered command bindings (via
     KeymapService.registerCommandBinding from ExtensionManager)
  3. user file at <appDir>/keybindings.yaml
  4. settings JSON overlay at app.keymap.overrides

The when-clause grammar is a tiny recursive-descent parser over
boolean expressions on a named context bag — VS-Code style
`palette.open && !textInputFocused`. Producing services publish
scope flags via setScopeFlag.

Keys reference LogicalKeyboardKey.keyId (stable across keyboard
layouts), not the locale-aware keyLabel the consultant flagged.

Ships:
  - lib/kernel/src/keymap/{key_chord, when_clause, intents, keymap,
    keymap_service}.dart
  - assets/keymaps/default.yaml (the baseline preset)
  - 90+ unit tests covering parser precedence, layering precedence,
    scope evaluation, register/unregister, settings overlay,
    malformed-input tolerance
  - app.dart root handler routes through KeymapService → Actions
  - ExtensionManager mirrors every legacy defaultBinding into the
    keymap as a contribution layer

KeybindingResolver kept temporarily as a back-compat shim for
callers we haven't migrated yet; safe to delete once the last
caller goes through Actions.

Closes T-110 (consultant: scoped Shortcuts/Actions; off keyLabel).
Annotates T-23 with what's left for T-100. Unblocks T-64 / T-65 /
T-66 (preset data tickets).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 21:40:02 +02:00
jpmschweitzerandClaude Opus 4.7 2768f11767 fix SchedulerService isolate-spawn race (T-106)
_startTicker fired Isolate.spawn(...).then((iso) => _isolate = iso)
and returned. If _stopTicker landed before the spawn future resolved,
_isolate was still null at kill time and the just-spawned isolate
(with its Timer.periodic) leaked forever.

Track the spawn as _isolateReady and have _stopTicker await it before
killing. Same shape as the NativePty fix from T-96.

dispose() is now async; the single caller in facade.dart already
sat inside an async dispose chain and just needed the await.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 21:19:20 +02:00
jpmschweitzerandClaude Opus 4.7 70ce6c270e fix untrusted-workspace RCE in dugite git resolution (T-98)
Drop the workspaceRoot parameter from resolveToolchainPaths /
Toolchain.resolvePaths entirely. The old code resolved
\`<workspaceRoot>/native/dugite/bin/git\` as the git binary before
falling back to PATH — a malicious repo could commit an executable
at that path and clide would run it on the first auto-fired
git.status (which fires automatically on workspace open).

Dugite now resolves against trusted locations only:
1. CLIDE_DUGITE_DIR env var (dev override).
2. <exe-parent>/dugite/bin/git (production bundle).
3. <exe-parent>/lib/dugite/bin/git (alternate bundle layout).

Test plants `native/dugite/bin/git` in a temp workspace and asserts
the resolved git path is NOT inside the workspace.

Callers updated (8 sites): main.dart, backend_entry.dart twice,
test_app.dart three times (compute now wraps a no-arg call), plus
five test fixtures. backend.dart's now-vestigial hintRoot left in
the struct for cleanup under T-99.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 20:56:02 +02:00
jpmschweitzerandClaude Opus 4.7 ab2e5e618b tree_sitter test coverage + DI seam, ratchet floor to 95
Add `colorForRole` switch-arm tests (every role → token mapping plus
the unknown-role fallback). Introduce a DI seam in `TreeSitterService`
and `TreeSitterLib` so tests can substitute the FFI surface and asset
loaders without dlopen'ing `libtree-sitter.so` —
`TreeSitterLib.testing(...)` takes named per-function overrides with
safe no-op defaults, and `TreeSitterLib.fromDynamicLibrary(...)` lets
the smoke test load the vendored library explicitly. Production
paths (`TreeSitterService.shared`, `TreeSitterLib.instance`) are
unchanged.

Fake-FFI tests walk every branch of `_init`, `_loadGrammar`,
`highlight`, and `dispose`. The smoke test catches FFI-signature
regressions the fakes can't, by exercising the real native library
end-to-end on Linux. Together this takes `tree_sitter_service.dart`
from 17% to 96% and crosses the global 95% target — closing out the
D-66 line-coverage epic.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 20:21:05 +02:00
jpmschweitzerandClaude Opus 4.7 e430a87569 test sweep: kernel commands + widgets coverage, ratchet floor to 93
Add tests for `keybindings.dart` (KeyEvent → Keybinding mapping,
parse-error edges, resolver entries view), `toolchain_paths.dart`
(the Flutter-free `ToolchainView.resolved` static view), and several
`widgets/src/` primitives: tooltip hover/overlay, palette filter +
submit, multitab controller `copyWith` + size getters, and additional
markdown branches (h3–h6 headings, tables, strikethrough, default
block fallback, record-link tap).

Unfreezes the pre-push coverage floor that was held at 90 on
2026-05-14 by mistake and ratchets to 93. Tidies eight test files
that had accumulated unused imports flagged by `unnecessary_import`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 20:20:37 +02:00
jpmschweitzerandClaude a3a10cddf3 test sweep: kernel extensions + scheduler residuals (T-91)
Cover the remaining catch / no-op branches in
kernel/src/extensions_manager.dart (duplicate register, unknown
activate, activate-throws, deactivate-throws, keybinding unbind
on deactivate, `all` getter passthrough) and exercise the
SchedulerService event surface (ProjectOpened starts the ticker,
ProjectClosed stops it cleanly). Pushes line coverage to 92.73%.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-14 14:39:45 +02:00
jpmschweitzerandClaude Opus 4.7 0c063b835e test sweep: kernel/src/panels foundational coverage (T-91)
test / unit + widget + golden + a11y (push) Failing after 30s
test / integration_test (xvfb) (push) Has been skipped
test / bundle smoke (xvfb 5s) (push) Has been skipped
test / daemon subprocess + web WASM smoke (push) Has been skipped
test / dart doc (lib API) (push) Failing after 1m2s
Two test additions for the panels subsystem:

- registry_test: setTabOrder ordering contract (unknown ids sink),
  definitionFor lookup, SlotId equality + hashCode + toString.
- drag_resize_test (new): horizontal drag adjusts sidebar slot size
  via setSize, contextPanel drag inverts the delta sign, hovered
  state flips line colour.

Coverage: kernel/src/panels/slot_id.dart 5/7 -> 7/7; registry.dart
30/42 -> ~all; drag_resize.dart 0/35 -> ~all.

Total coverage 90.99% -> 91.59%; floor bumped to 91.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 11:58:09 +02:00
jpmschweitzerandClaude Opus 4.7 14d73b618f test: cover ClideKernel.of throw branch (T-91)
One small addition to facade_test: ClideKernel.of called from a
Builder with no ClideKernel ancestor throws the documented
FlutterError. Mirrors the existing ClideTheme.of coverage.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 10:05:12 +02:00
jpmschweitzerandClaude Opus 4.7 fb48a3133f test sweep: icons, log.trace, DialogHost, FilesDropped getters (T-91)
Three small additions to push coverage toward the 90% target:

- test/widgets/icons_test.dart: one sweep test calling .paint() on
  every custom ClideIconPainter (Check, ChevronRight, ChevronDown,
  Dot, Folder, Gear, GitBranch, Plug, Search, Terminal, Warning).
- log_test: Logger.trace covered at minLevel.trace + filtered out
  at minLevel.info.
- services_bigger_test: DialogRouter.current getter; DialogHost
  widget rendered with backdrop + inner builder, then dismissed
  through the router. Plus FilesDropped subsystem/kind getters
  exercised through the existing notifyDropped test.

Coverage 89.08% -> 89.93%.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 19:13:39 +02:00
jpmschweitzerandClaude Opus 4.7 dc86fac85e test sweep: cover SettingsStore project + ext scopes + YAML emitter (T-91)
test / unit + widget + golden + a11y (push) Failing after 32s
test / integration_test (xvfb) (push) Has been skipped
test / bundle smoke (xvfb 5s) (push) Has been skipped
test / daemon subprocess + web WASM smoke (push) Has been skipped
test / dart doc (lib API) (push) Failing after 1m3s
Seven new tests in test/kernel/src/settings_test.dart covering the
SettingsStore branches the existing 6-test suite didn't reach:

- project-scoped set + get round-trip when projectDir is configured
  (covers the project-file readFile branch + the project-scope set
  path).
- setting a project key without a project throws StateError.
- ext.* keys default to app scope; project overrides app when both
  are set (covers the project-overrides-app branch in _lookup).
- setProjectDir(null) clears the in-memory project values.
- YAML emitter handles every scalar branch: bool, num, string
  (simple + special-chars + empty), list (mixed types incl null),
  and round-trips through reload (covers _emitScalar + _emit
  branches for null / List / unknown types).
- load tolerates a malformed YAML file (_readFile catch path).
- load returns empty when file is missing or blank.

Coverage: kernel/src/settings.dart 104/123 -> 112/123 (91%).
Remaining lines are a couple of corner-case formatting paths in
_emit when the top-level value isn't a Map (the public API always
serializes a Map, so they're effectively unreachable through normal
use).

Total coverage 83.85% -> 83.92%.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 08:27:04 +02:00
jpmschweitzerandClaude Opus 4.7 e2d98445f5 test sweep: cover ExtensionManager contribution branches + ctx (T-91)
test / unit + widget + golden + a11y (push) Failing after 31s
test / integration_test (xvfb) (push) Has been skipped
test / bundle smoke (xvfb 5s) (push) Has been skipped
test / daemon subprocess + web WASM smoke (push) Has been skipped
test / dart doc (lib API) (push) Failing after 1m2s
Five new tests in test/kernel/src/extensions_manager_test.dart
covering the contribution-type case branches and the _ExtensionContext
passthrough surface that the existing 8-test suite didn't reach:

- TrayItemContribution lands in TrayRegistry on activate; deactivate
  removes it.
- StatusItem + ToolbarButton contributions activate/deactivate
  cleanly through PanelRegistry.
- LayoutPresetContribution exercises the no-kernel-side-wiring case
  branch (consumed by default-layout's own activate()).
- Every _ExtensionContext getter (log / events / messages / settings
  / theme / i18n / panels / arrangement / commands / palette /
  clipboard / files / notify / dialog / tray / secrets / os / net /
  focus / project / ipc) returns the same instance the kernel
  exposes — locks in the passthrough contract.

Coverage: kernel/src/extensions_manager.dart 85/130 -> 122/130
(94%). Remaining 8 lines are the disabled-by-default + persisted-
disabled paths plus the deactivate-during-failed-activate cleanup —
edge cases reachable only when extensions throw.

Total coverage 83.39% -> 83.85%.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 08:22:33 +02:00
jpmschweitzerandClaude Opus 4.7 2a7875e1a9 remove OsBridge openURL/reveal tests — they spawn OS popups
test / unit + widget + golden + a11y (push) Failing after 29s
test / integration_test (xvfb) (push) Has been skipped
test / bundle smoke (xvfb 5s) (push) Has been skipped
test / daemon subprocess + web WASM smoke (push) Has been skipped
test / dart doc (lib API) (push) Failing after 1m2s
services_bigger_test.dart's openURL + reveal tests called the real
OsBridge methods, which Process.run xdg-open / open / explorer.
On a desktop session the OS dispatcher (KIO on KDE, etc.) surfaces
a "Could not read file …" error dialog for the bogus URL, owned by
the desktop session not the test process — it persists after the
test exits and a fresh run spawns another one. The user has to
manually close each popup, blocking CI from running unattended.

Coverage value was minimal (anyOf(true, false)). Leaving fire() and
the rest of the OsBridge bus-event surface; command-shape coverage
of openURL/reveal can come from integration tests where a real OS
dispatcher is desired.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 08:02:37 +02:00
jpmschweitzerandClaude Opus 4.7 7ba0500f75 test sweep: cover kernel toolchain + medium services (T-91)
test / unit + widget + golden + a11y (push) Failing after 30s
test / bundle smoke (xvfb 5s) (push) Has been skipped
test / integration_test (xvfb) (push) Has been skipped
test / daemon subprocess + web WASM smoke (push) Has been skipped
test / dart doc (lib API) (push) Failing after 1m1s
Two test files chasing the bigger kernel residuals:

- test/kernel/src/toolchain_test.dart (10 tests): Toolchain defaults
  + missing list, applyResolved with full / partial paths,
  waitForResolution sync + async, Toolchain.resolvePaths against the
  current workspace + dugite detection + PATH fallback,
  resolveToolchainPaths top-level matches the static.
- test/kernel/src/services_bigger_test.dart (15 tests): DialogRouter
  show/dismiss/queue/notify, FileServices.pick* UnimplementedError
  trio + notifyDropped event, OsBridge openURL / reveal / fire,
  WindowControls setStyle idempotency + MissingPlugin-safe
  platform-channel methods + isMaximized success path,
  SchedulerTier intervals + SchedulerTick payload + start/dispose.

Coverage: kernel/src/toolchain.dart 37/95 -> 67/95 (71%);
dialog.dart 20/47 -> 27/47 (remaining is the DialogHost widget,
needs a real overlay tree); files.dart 1/16 -> 14/16 (88%);
os.dart 1/26 -> 19/26 (73%); window_controls.dart 2/25 -> 25/25
(100%); scheduler.dart 14/41 -> 18/41 (remaining is the isolate
ticker entry point, only fires after a real project-open event).

Total coverage 82.43% -> 83.57%; floor bumped to 83.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 08:00:23 +02:00