Commit Graph

4277 Commits

Author SHA1 Message Date
Teknium a460b44c93 docs(desktop): document directive action hover grace 2026-09-07 08:21:57 -07:00
Teknium 04767e7aaa fix(display): distinguish estimated context from provider usage 2026-09-07 08:13:01 -07:00
Teknium 478d772f2c fix(desktop): resolve artifact downloads in their originating session 2026-09-07 07:11:36 -07:00
Teknium f9d05081d8 fix(desktop): route relative remote artifacts to gateway download
Salvage the focused renderer hunk from #104131. Preserve raw gateway tilde and relative paths at the authenticated file bridge; do not reinterpret remote paths on the client or widen external protocol handling.

Co-authored-by: Halldrix <12357213+Halldrix@users.noreply.github.com>
2026-09-07 07:11:36 -07:00
Teknium 6504f33f49 fix(desktop): honor explicit worktree sidebar dismissal
Slim salvage of #103992: preserve dismissal provenance as removed ids rather than a second metadata schema; discovery only overrides successful git removals. Explicit hide is durable even before a discovery scan finishes.

Co-authored-by: Tranquil-Flow <66773372+Tranquil-Flow@users.noreply.github.com>
2026-09-07 07:07:49 -07:00
Teknium d70fb4e6bd fix(desktop): keep directive hover timers on owned boundaries 2026-09-07 06:58:20 -07:00
Konstantin Khlopkov 45c7388213 fix(desktop): give the composer action pill a transit-safe hide delay 2026-09-07 06:58:20 -07:00
hermes-seaeye[bot] 1f92ab1ddf fmt(js): npm run fix on merge (#105106)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-09-07 13:53:40 +00:00
Jerry Gooch 26ed08c23e fix(desktop): isolate hidden composer selection 2026-09-07 06:46:56 -07:00
Teknium 0b3391322c fix: keep desktop provider setup within its selected profile
Remount scope-owned credential state on Applies-to changes and bind onboarding requests to their initiating route. Cancel polling and invalidate late results when setup closes or reopens, without undoing writes already sent.

Co-authored-by: By JTT <29462570+jordan-thirkle@users.noreply.github.com>
2026-09-07 06:44:04 -07:00
Teknium 75fbefacce test(desktop): keep cold module transforms outside UI assertion deadlines 2026-09-07 06:34:02 -07:00
anhtahaylove 49fc4911a9 test(desktop): stop the unread-tile test timing out on loaded CI
`session-unread-tile.test.ts` intermittently fails CI with
`Test timed out in 15000ms` at the first case. It has hit at least three
independent branches, `main` included, so it is not tied to any one change.

The cost is module reconstruction. `beforeEach`/`afterEach` both call
`vi.resetModules()`, so each of the three cases re-imports six modules,
including `@/lib/chat-runtime` and the pane-tree store. Locally that is
~3.3s on median but the tail reaches 11.8s (3.6x the median) on a warm
machine; a loaded CI runner pushes that past the 15s budget. One observed
CI run passed at 14614ms, 386ms under the limit, which is the same test
sitting on the wrong side of the same boundary.

Drop `resetModules` and undo the per-test state explicitly instead:

- collect the `registry.register` disposers and run them in `afterEach`,
  matching what `session-states.test.ts` already does;
- reset `$layoutTree` and `$activeTreeGroup` at the top of `setup()`.
  `declareDefaultTree` only seeds the layout when it is empty, so without
  this the second case would adopt the first case's tree.

The test keeps its teeth: reverting the `$focusedStoredSessionId` change
from a5b5043 still fails exactly the same two cases as before this patch.

Slowest of 30 consecutive local runs goes from 11.84s to 3.70s, with the
median roughly unchanged.
2026-09-07 06:34:02 -07:00
Teknium 50d7a756d8 fix(desktop): scope separator highlighting to model searches
Keep command-palette literal filter semantics unchanged; opt model surfaces into the shared fold. Preserve original highlighter contracts and trim new regressions to two invariants. Native Electron catalog before/after and visibility dialog verified; campaign suites remain queued.
2026-09-07 06:21:44 -07:00
DavidMetcalfe b292e2d91d fix(desktop): fold the model-picker downloads filter too
Review-response sweep found one straggler: model-picker.tsx's
visibleDownloads filter still used raw toLowerCase().includes(), so a
hyphen-style query wouldn't match a space-separated download target —
the same bug class this PR fixes, in the same picker. The catalog
menu's equivalent filter was already converted.
2026-09-07 06:21:44 -07:00
DavidMetcalfe afcd5ea86a fix(desktop): fold separators in model search so filters and highlights agree
Model ids use hyphens/underscores, display names use spaces, versions use
dots. The pickers' filter haystacks contained both the raw id and the
display name, but the highlight only ever saw the display label — so
'qwen3.8-flash' revealed the row (via the id segment) while lighting up
nothing, and model-picker.tsx had the inverse polarity (spaces matched,
hyphens didn't highlight). This violated HighlightMatches' own documented
contract: the query must mirror the filter's semantics or the emphasis
lies.

One length-preserving searchFold ([-_.] -> space, 1 char in / 1 char out)
now runs on both sides of every model-search filter AND inside
HighlightMatches' range finder. Length preservation keeps mark ranges
valid against the original text, so <mark> rendering is untouched. The
fold is a per-character substitution applied to both sides, so any query
that matched before still matches — only coverage grows.

- lib/text.ts: searchFold + foldIncludes, the one matcher for all pickers
- highlight-matches.tsx: ranges computed on folded text, marks slice original
- model-catalog-menu.tsx: family, MoA, and download haystacks use foldIncludes
- model-visibility-dialog.tsx, model-picker.tsx: same (fixes inverse polarity)
- dropdown-menu.tsx: DropdownMenuSearch sets spellCheck={false} — squiggles
  under model ids are noise; composer/settings inputs already disable it

Tests: fold primitives (equivalence, 1:1 length, superset), highlighter
fold behavior + index fidelity, end-to-end menu behavior (hyphen query
marks the spaced label; space query finds the hyphenated id without
over-matching), and an updated hidden-model-search test whose id-style
query now legitimately highlights.
2026-09-07 06:21:44 -07:00
Teknium fd3565deec fix: remove dedicated user-facing output cap controls 2026-09-07 06:15:43 -07:00
Teknium f4f691c6cc fix(desktop): retain restored offsets through deferred layout
Observe post-settle transcript resizes until reader input or a live run takes ownership. Keep parked upward-wheel cancellation and namespace capture intact. Extend the maintained Chromium restoration probe with long reload and streaming controls; retain the two existing component invariants.
2026-09-07 06:14:35 -07:00
Teknium 3329b38bf3 fix(desktop): retain scroll ownership and honor hydration wheel intent 2026-09-07 06:14:35 -07:00
Teknium 9a78d5ac2b test(desktop): document and probe reading-position restoration 2026-09-07 06:14:35 -07:00
Victor Nogueira 52ce7b23d2 fix(desktop): scope saved scroll by gateway 2026-09-07 06:14:35 -07:00
Victor Nogueira 0237fcc295 fix(desktop): defer parked scroll restore until ready 2026-09-07 06:14:35 -07:00
David Metcalfe c06caad8f7 fix(desktop): preserve per-session chat scroll position
Rework per hermes-sweeper review (keep_open, salvageability=medium):

- Capture moves out of the render body into the session-switch layout-effect
  cleanup, so only committed switches persist state (no uncommitted render
  can write localStorage).
- Live state is fed by both scroll events and a ResizeObserver on the
  content element, so distance-from-bottom stays fresh under async
  relayout that changes height without a scroll event (the staleness gap
  #70478's own review threads flagged).
- State is distance-from-bottom (or sticky-bottom), not raw scrollTop:
  the render-budget backfill prepends older turns and main anchors by
  distance-from-bottom, so an absolute offset no longer identifies the
  same reading location after the height change.
- Restore integrates with main's hasGroups/settle/anchor lifecycle: the
  settle loop re-applies the remembered target, defers on a clamped offset
  (content still arriving), hands back locked only for sticky-bottom, and
  leaves mid-read sessions escaped at their offset.
- anchorBeforePrepend no longer records 0 mid-load, which would clobber a
  restored offset once the backfill lands; the settle loop owns the target
  every frame until settled.
- Storage is scoped per profile with the session.ts .profile.<encoded>
  key pattern (no cross-profile bleed, #67709 pattern) and LRU-capped at
  120 sessions per profile.
- Regression tests: state classification, target math, profile isolation,
  LRU eviction, corrupt/invalid payload handling.

Related to #45562 (partial; no automatic closure)

(cherry picked from commit 1d79bef93f63d7b190b471bf652b5109b4288a8e)
2026-09-07 06:14:35 -07:00
Teknium a275adefe2 fix(desktop): retain manual recovery scope through retries 2026-09-07 06:12:00 -07:00
Teknium 5f02693fe0 fix(desktop): reconnect only the active gateway route 2026-09-07 06:12:00 -07:00
Teknium 2bd6fe0dde fix(desktop): keep gateway reconnect available on open transports 2026-09-07 06:12:00 -07:00
Teknium 6c0750e7b7 fix(desktop): cancel MCP auth when scoped Skills tabs leave their owner 2026-09-07 06:10:28 -07:00
Teknium 09229312aa test(desktop): trim MCP relay coverage to ownership and cleanup invariants 2026-09-07 06:10:28 -07:00
Filipe Bezerra 5cf8d7451e fix(desktop): preserve explicit local MCP OAuth without callback bridge 2026-09-07 06:10:28 -07:00
Filipe Bezerra e3ba651b6d fix(desktop): relay MCP OAuth through client-local callbacks 2026-09-07 06:10:28 -07:00
Teknium f83ff89780 fix(desktop): reveal complete slash help across the window
Preserve producer descriptions without identity wrappers and size the existing themed tooltip to the viewport. Replace skipped and structural tests with two behavioral invariants. Native Electron before/after hover, click and keyboard verification passed; campaign suite validation remains queued.
2026-09-07 06:10:15 -07:00
Konstantin Khlopkov 00bb169d1b feat(desktop): full command description hover on slash autocomplete rows (#104729) 2026-09-07 06:10:15 -07:00
Teknium 8db9f49cec fix(desktop): show failed project loads separately from empty sessions
Salvage #104301 error presentation and translations. Keep drill-in outcome local to its mounted scope, ignore stale responses, retain existing rows, and show retry even when cached lanes exist.

Co-authored-by: elvindu <dumanxiang@qq.com>
2026-09-07 06:07:00 -07:00
Teknium ee172900d5 test(desktop): use typed profile fixtures and scope transport stubs 2026-09-07 05:56:17 -07:00
Teknium 6eb4c0803b fix(desktop): limit credential selector to API keys and cover target changes 2026-09-07 05:56:17 -07:00
By JTT 0eabb58e90 fix(desktop): honor Settings profile selector on Providers page
Providers → API Keys was reading the active gateway profile instead of
the shared Settings 'Applies to' override used by Model and Tools & Keys.
Navigating from Model (profile B) to Providers silently switched back to
active profile A, making credential configuration ambiguous.

Now passes $settingsRequestProfile to useEnvCredentials and renders
SettingsProfileScope for visual parity with KeysSettings.

Fixes #103993
2026-09-07 05:56:17 -07:00
Teknium 513c0b2e3c fix: follow focused session panes in desktop sidebar
Reuse the focused pane derivation for visible sidebar activity rather than trusting a stale workspace route. Live Electron reproduction: Kanban stayed highlighted while a resumed session tab was visible; the highlight now clears without changing the retained route. Adapted the rendered sidebar invariant and focus derivation from MarcoFernstaedt's PR #88691 for #88517. Directory suite queued under the campaign test lock.
2026-09-07 05:56:02 -07:00
Teknium 202128f28f fix(desktop): satisfy updater prerequisite lint rules 2026-09-07 05:55:26 -07:00
Teknium 6caf37b6bd fix(desktop): check Windows handoff files before stopping backends 2026-09-07 05:55:26 -07:00
hermes-seaeye[bot] 0d08cd295f fmt(js): npm run fix on merge (#105041)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-09-07 12:09:16 +00:00
Robert Borkowski 9d9bfd6a75 fix: keep secondary profile approvals routable without cached bindings
Preserve profile ownership proven at the secondary socket boundary rather
than trusting arbitrary wire profile fields. Retire transient local owners
with the profile pool, while keeping durable and exact remote ownership first.

Salvage #103774 with two invariant tests and routing documentation. The
profile-only fallback was also identified in the earlier #103770; this
version retains the producer provenance and retirement boundary.

Live Desktop renderer with two isolated serve backends: Reject previously
failed after clearing durable bindings, leaving approval pending. With this
change, the same action sends deny to the owning backend and pending clears.
Existing-binding controls pass on both sides. No vendor inference used.

Fixes #103755
Salvaged-from: 8a3c545e255b66b6ca4bc4b99cd725c5f7a08632
2026-09-07 05:06:54 -07:00
Teknium f6a4a5adde fix: keep multiline delegation goals out of Desktop report bodies
Recognize the full producer task header when a batch goal spans lines,
so the next task goal and preceding transcript footer cannot become part
of the displayed result. Extend the existing invariant and real SQLite
producer probe with that case.

Make the live probe artifact path explicit, run Chromium headlessly, and
document its synthetic fixtures and integration fidelity limits.
2026-09-07 05:06:39 -07:00
Teknium 8c10ffba55 fix: preserve Desktop async report bodies during hydration
Keep compact completion labels while rendering only result and job output bodies, including legacy and batch deliveries. Credit Gyarados4157's #101083 investigation; avoid rendering its full model instruction envelope.
2026-09-07 05:06:39 -07:00
hermes-seaeye[bot] a51912c25b fmt(js): npm run fix on merge (#105038)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-09-07 12:03:25 +00:00
Teknium 55ad5afa12 fix(desktop): retain Markdown boundary and code-copy whitespace 2026-09-07 04:57:11 -07:00
Teknium 3e1b7af21b fix(desktop): preserve Markdown whitespace through media extraction
Remove whole-document whitespace cleanup that erased hard breaks and fenced-code spacing across all five ingestion paths. Limit generated-image gap joining to the removed image itself. Keep soft newlines as soft breaks.

Investigated #97117 and the approaches in #97431 (@wooyongbin3-cpu) and #97175 (@Jackal991); both leave fenced-code whitespace and sibling ingestion paths exposed, so remove the destructive normalization instead.
2026-09-07 04:57:11 -07:00
Teknium dc51977799 fix: keep desktop voice choice when storage is full 2026-09-07 04:56:52 -07:00
liuhao1024 938a3dc8f9 fix(desktop): keep read-aloud independent of gateway auto-TTS
Salvage #99095 (e7ea53074ab2b64a1530641659399d9f1bb4b435), completing one-time migration for both boolean values and using the existing storage helpers. Hydration and local toggles never edit backend configuration. Fixes #99076.
2026-09-07 04:56:52 -07:00
Teknium 42f8389987 fix: restore persisted assistant replies alongside tools and reasoning 2026-09-07 04:56:22 -07:00
Teknium e412727e72 fix: keep task-scroll node tests out of Vitest discovery 2026-09-07 04:56:05 -07:00
Teknium 80e585fad3 test: verify desktop task tails remain reachable in Chromium 2026-09-07 04:56:05 -07:00