Commit Graph
23 Commits
Author SHA1 Message Date
Yichen Jiang db14361372 test(web): scope the aria age normalizer to the region that needs it
Collapsing every relative-time bucket to `{{age}}` reached the session-tree
goldens, where a literal age is the assertion: a fresh row reads `now` and an
older one does not. Six e2e files failed, two of them by aborting mid-scenario
and leaving their replay fixtures half-consumed.

`captureStableAria` now takes the rule as an opt-in, and only the reference
menu — whose rows are dated from the live Host list — asks for it.

Refs #3154
2026-08-27 12:10:52 +08:00
Yichen Jiang 97e0299f74 feat(web): trim @ mention rows and cut their discovery cost
Session candidates labelled from projection checkpoints instead of a full
log fold per keystroke, with the uncheckpointed remainder folded once and
memoized while its log stays cold. The file index keeps answering while an
invalidated traversal rebuilds behind the caret, and its default exclusions
now cover build outputs so deep sources stay reachable.

Rows carry only what distinguishes them: a file names its parent directory,
a session names its workspace only when that workspace is not the current
one, and a drilled listing names none because its new breadcrumb does.

Resolves #3180
Related to #3154
2026-08-27 11:42:06 +08:00
Yif 0114dc1f81 feat(web): polish the input trigger menu presentation
Candidate rows lead with domain icons instead of localized text
prefixes; pointer and keyboard share one reducer-owned highlight (last
input wins); drillable folder rows reveal a localized Browse-folder +
Tab keycap hint with the library chevron; pending sources render
skeleton bars; the menu spans the composer card. The editable @dir/
text decorates color-only — the domain icon now belongs exclusively to
the settled reference chip. Composer placeholders advertise / and @,
and the zh copy for commands is unified to 指令.
2026-08-26 21:17:46 +08:00
Yichen Jiang e177571236 Merge remote-tracking branch 'origin/master' into worktree/web-textarea-refactor-991614
# Conflicts:
#	.agents/notes/archived/manifest.json
#	apps/web/tests/reference-composer.e2e.ts
#	pnpm-lock.yaml
2026-08-25 19:35:55 +08:00
Tianyi Cui ce031ddd16 fix(web): cover authenticated host runtimes 2026-08-25 14:23:46 +08:00
Yichen Jiang 07319c011d test(web): share the per-key composer draft helper
CI hit the same dropped-fill race in lifecycle-chrome's slash-menu
sequence that the folder scenario hit: fill()'s single-task select-all +
edit lands on a Lexical selection that has not absorbed the DOM
selection after a trigger-menu interaction, so the previous draft
survives and poisons the next test. Promote the per-key gesture to
support.ts and use it at both proven-fragile sites.
2026-08-25 11:52:10 +08:00
Yichen Jiang e71688c1fe test(web): write folder queries with per-key gestures
Directly after a chip deletion, fill()'s single-task select-all +
insertText lands on a Lexical selection that has not absorbed the DOM
selection yet and is dropped, leaving the previous draft in place. Real
keystrokes leave room for selectionchange between keys, matching what a
user's typing does.
2026-08-25 10:42:40 +08:00
Yichen Jiang 0a247137f0 Merge remote-tracking branch 'origin/master' into worktree/web-textarea-refactor-991614
# Conflicts:
#	apps/web/tests/composer-draft-scroll.e2e.ts
#	apps/web/tests/expected/reference-composer/caret-edits.expected.md
#	apps/web/tests/startup-auto-selection.e2e.ts
#	pnpm-lock.yaml
2026-08-25 10:42:32 +08:00
imccyu f5f0448bee refactor(subagent): consume shared session observations 2026-08-25 06:09:25 +08:00
Tianyi Cui caf386f59c fix(test): use expected-output naming 2026-08-24 21:37:14 +08:00
Tianyi Cui 6189e4a374 test(web): separate session snapshots from goldens 2026-08-24 21:36:31 +08:00
Yichen Jiang 4036db4450 test(web): create reference fixtures before the workspace connects
CI's snapshots lane timed out waiting for the folderx candidate: the
fixture directory was created after connectFreshWorkspace, racing the
Host's file index on a loaded runner. Land every fixture (and the
workspace directory itself) before the connect, and give the first
folder query a cold-start allowance.
2026-08-24 16:57:38 +08:00
Yichen Jiang dad39c8c18 feat(web): settle folder references on pick and move descent to a drill verb
A directory row in the @ menu had one verb doing two jobs: picking it
inserted literal @dir/ text and kept the menu open, so a user wanting
the folder itself never got a settled entity — the token kept its
trigger character and stayed editable, nothing like a file's atomic
chip.

Split the intents on the same row, mapped to shell-completion instincts:
row click / Enter settles the directory as an atomic folder chip (the
file chip's exact language; canonical @dir/ mention as its serialized
form — the { insert } arm the folder path never took), while Tab or the
row's trailing chevron drills: literal editable text, menu open on the
children. One new dimension carries it: candidate.drill advertises the
verb, InputTriggerPick.action reports it, ArbitrateKey gains 'tab', and
the keymap intercepts Tab only while a drill row is highlighted.

Covered by controller arbitration, MenuView chevron routing, the
ui-reference verb split, a keymap Tab-passthrough spec, and a real-
browser e2e driving all three gestures; menu golden refreshed for the
chevron and the fixture directory.
2026-08-24 16:45:34 +08:00
Yichen Jiang b010c20703 Merge remote-tracking branch 'origin/master' into worktree/web-textarea-refactor-991614
# Conflicts:
#	packages/client/ui-conversation/src/client/skeleton/InputBar.tsx
#	packages/client/ui-conversation/tests/input-bar.client.spec.tsx
2026-08-20 23:27:33 +08:00
Yichen Jiang c8b4ec73a0 fix(ui-conversation): step across chips without a keyboard-selected state
isKeyboardSelectable() defaulted to true, so an arrow key at a chip edge
created a NodeSelection whose DOM projection collapses to an element
point; the plain-text binding's arrow/delete/insert handlers all bail on
non-Range selections, deadlocking arrows, typing, and Backspace at the
chip until a pointer click. False restores the placeholder semantics:
arrows cross the chip in one move and Backspace/Delete remove it whole.
Reproduced and verified with real-key Playwright probes (CDP raw
keydowns carry no engine default and cannot reproduce it); the
reference-composer e2e pins the gesture in the browser lane.
2026-08-20 22:48:56 +08:00
Yichen Jiang 315fc9b16e fix(ui-conversation): address composer review findings
- drop the space-key debug probe from the production keymap
- give pastes their own undo boundary (PASTE_TAG via $addUpdateTag on the
  nested dispatch path), with an input-bar regression test
- claim decoration outranks text-ref entities on the leading-token seat:
  the entity transform skips the active claim token, restoring the warn
  color for lexicon-listed command names (probe-confirmed regression test)
- caret-only commits no longer advance draftRev or re-publish InputState;
  content changes still do (snapshot-built CAS spans stay valid)
- retire stale JSDoc/contract wording (paste-upgrade, set-invalid; the
  invalid bit only promises the render treatment)
- rename the keydown probe spec to keymap-routing and drop test dead code
- reference-composer e2e gains the #2813 type-ahead-of-chip gesture
- archive three superseded composer notes (Safari soft-wrap, text layers,
  decoration keys), rewrite the input-machine note's superseded half in
  place, and record the new behavior decisions in the Lexical note
2026-08-20 22:20:31 +08:00
Yichen Jiang f6fb66a318 docs+build(ui-conversation): lexical composer collateral
The client-bundle preset pins the production/development exports condition
(lexical's node-condition file selects its flavor with a top-level await a
CJS bundle cannot carry); the composer carries an explicit aria-label (a
div's data-placeholder does not name it the way a textarea placeholder
did); READMEs, the composer.bar slot doc, and the Agent Note record the
editor architecture; web e2e drives the contenteditable surface.
2026-08-20 18:27:55 +08:00
Yichen Jiang b2c9c3ce37 fix(web): derive the caret-delete range from what the draft lost
A caret Backspace or Delete replaces no selection, so `beforeinput` reports
the bare caret and the previous derivation produced a negative inserted
length and fell back to the ambiguous scan. The delete half of the defect
survived, and the component test missed it by pre-expanding the selection to
the span the engines never report.

The range for a caret delete now comes from the direction `inputType` names
and the number of characters the draft actually lost, measured rather than
assumed to be one, so a grapheme, word, or line deletion sizes correctly.
Only the insert and delete families are recorded; a history replay reports
wherever the caret sits and would name a wrong span while passing every check.

Component tests cover the caret Backspace, Delete, and word-delete gestures,
and an assembled browser scenario drives them as real key presses, which is
the only place an engine's reported range is observable.
2026-08-20 17:11:35 +08:00
Yichen Jiang 1585e539d2 fix(web): address reference review defects 2026-08-19 18:02:10 +08:00
Yichen Jiang 988dd7824a fix(web): align reference input and recall ordering 2026-08-19 17:11:36 +08:00
creatixchu 6bb79911ba refactor(reference): serve discovery through typert Remote faces
Replace the legacy reference.* API Proxy domain with @Remote methods on the
owning services, following the typert gateway design master adopted on
2026-08-02 (message-feedback and plugin-inventory precedents):

- FileReferenceService and SessionReferenceResolver extend TypertRemoteService;
  fileReferences/list and sessionReferenceResolver/candidates are unary Remote
  methods cancelled through the reserved trailing signal, and the candidates
  face attaches each candidate's canonical mention under the configured limit
- move the wire types to type-only ./types subpaths (FileReferenceCandidate,
  SessionReferenceMentionCandidate) and export ./typert plus ./remote artifacts
- mount both contributions in the api-remotes client assembly; ui-reference
  consumes ctx.remote instead of connection.api.references and registers zh/en
  locale dictionaries for its sections and labels
- delete the reference.* routes, schemas, map rows, client stubs, and fixtures;
  the connection fixture serves the Remote endpoints instead
- release deliverPrompt admission listeners when the agent is disposed with the
  prepared prompt still pending, and cover the reference-* RpcError codes in
  the schema spec
- add the missing tsconfig paths for the /grammar and /types subpaths (clean-
  tree vitest could not resolve @deepseek-ai/dsh-file-reference/grammar)
- regenerate the cordis catalog, capability seams, and event matrix; update the
  owning bilingual READMEs, Agent Notes, and the reference-composer golden
2026-08-17 18:35:30 +08:00
Yichen Jiang 188b60f208 Merge remote-tracking branch 'origin/master' into worktree/web-file-session-references
# Conflicts:
#	.agents/notes/implemented/architecture/2026-07-25-web-command-surfaces-and-assembly.i18n.yaml
#	.agents/notes/implemented/architecture/2026-07-25-web-command-surfaces-and-assembly.zh.md
#	.agents/notes/implemented/feature/2026-07-21-cross-session-references.i18n.yaml
#	.agents/notes/implemented/feature/2026-07-21-cross-session-references.md
#	.agents/notes/implemented/feature/2026-07-21-cross-session-references.zh.md
#	apps/web/tests/scaffold.ts
#	apps/web/tsconfig.json
#	docs/event-producer-consumer.md
#	docs/module-graph.md
#	packages/client/ui-conversation/README.i18n.yaml
#	packages/client/ui-conversation/README.md
#	packages/client/ui-conversation/README.zh.md
#	packages/client/ui-conversation/src/client/chat/MessageItem.tsx
#	packages/client/ui-slash/README.i18n.yaml
#	packages/client/ui-subagent/README.i18n.yaml
#	packages/client/ui-subagent/README.zh.md
#	packages/client/ui-subagent/src/client/index.ts
#	packages/client/ui-subagent/tests/browser-plugin.spec.ts
#	packages/context/session-reference/README.i18n.yaml
#	packages/context/session-reference/README.md
#	packages/context/session-reference/README.zh.md
#	packages/core/session/README.i18n.yaml
#	packages/core/session/README.md
#	packages/core/session/README.zh.md
#	packages/host/apiproxy/README.i18n.yaml
#	packages/host/apiproxy/README.md
#	packages/host/apiproxy/README.zh.md
#	packages/host/apiproxy/src/api-proxy.ts
#	packages/host/apiproxy/src/api/rpc.ts
#	packages/host/apiproxy/src/fetch/handler.ts
#	tsconfig.host.json
2026-08-06 16:59:44 +08:00
Yichen Jiang 634306156e Merge remote-tracking branch 'origin/master' into worktree/web-file-session-references
# Conflicts:
#	apps/cli/config/base.cordis.yml
#	apps/cli/config/web.cordis.yml
#	apps/cli/package.json
#	apps/web/tests/queue-actions.e2e.ts
#	apps/web/tests/snapshots/code-mode-round/ui.expected.md
#	apps/web/tests/snapshots/cordis-tool-round/ui.expected.md
#	apps/web/tests/snapshots/fresh-round-trip/ui.expected.md
#	apps/web/tests/snapshots/lifecycle-chrome/reloaded.expected.md
#	apps/web/tests/snapshots/live-interactions/cancel.expected.md
#	apps/web/tests/snapshots/live-interactions/error-auth.expected.md
#	apps/web/tests/snapshots/live-interactions/retry.expected.md
#	apps/web/tests/snapshots/question-composer/answered.expected.md
#	apps/web/tests/snapshots/queue-actions/editing.expected.md
#	apps/web/tests/snapshots/queue-actions/ui.expected.md
#	apps/web/tests/snapshots/steering/mid-steer.expected.md
#	apps/web/tests/snapshots/steering/settled.expected.md
#	docs/config-catalog.md
#	docs/cordis-catalog/services.md
#	docs/event-producer-consumer.md
#	docs/module-graph.md
#	packages/client/runtime/src/client/sessions/session.ts
#	packages/client/runtime/tests/fold-adapter.spec.ts
#	packages/client/ui-conversation/README.i18n.yaml
#	packages/client/ui-conversation/README.zh.md
#	packages/client/ui-conversation/src/client/chat/ChatView.tsx
#	packages/client/ui-conversation/src/client/chat/MessageItem.module.css
#	packages/client/ui-conversation/src/client/chat/MessageItem.tsx
#	packages/client/ui-conversation/src/client/chat/chat-flow.ts
#	packages/client/ui-conversation/src/client/input/contract.ts
#	packages/client/ui-conversation/src/client/input/facade.ts
#	packages/client/ui-conversation/src/client/input/hub.ts
#	packages/client/ui-conversation/src/client/input/machine.ts
#	packages/client/ui-conversation/tests/apply-inject.spec.tsx
#	packages/client/ui-conversation/tests/chat-branch-tails.spec.tsx
#	packages/client/ui-conversation/tests/chat-view.spec.tsx
#	packages/client/ui-conversation/tests/input-bar.spec.tsx
#	packages/client/ui-conversation/tests/input-machine.spec.ts
#	packages/client/ui-conversation/tests/skeleton.spec.tsx
#	packages/client/ui-reference/README.i18n.yaml
#	packages/client/ui-reference/package.json
#	packages/client/ui-reference/tsconfig.json
#	packages/client/ui-slash/README.i18n.yaml
#	packages/client/ui-slash/README.md
#	packages/client/ui-slash/README.zh.md
#	packages/client/ui-subagent/README.md
#	packages/client/ui-subagent/README.zh.md
#	packages/client/ui-subagent/src/client/index.ts
#	packages/client/ui-subagent/tests/browser-plugin.spec.ts
#	packages/client/ui-trajectory/tests/client-bundle.spec.ts
#	packages/core/session/README.i18n.yaml
#	packages/host/apiproxy/README.i18n.yaml
#	packages/host/apiproxy/README.md
#	packages/host/apiproxy/README.zh.md
#	packages/host/apiproxy/package.json
#	packages/host/apiproxy/src/api-proxy.ts
#	packages/host/apiproxy/src/api/index.ts
#	packages/host/apiproxy/src/api/sessions.ts
#	packages/host/apiproxy/src/fetch/handler.ts
#	packages/host/apiproxy/src/index.ts
#	packages/ui/tui/src/index.ts
#	packages/ui/tui/tests/tui.spec.ts
#	pnpm-lock.yaml
2026-08-03 19:34:40 +08:00