Commit Graph

4348 Commits

Author SHA1 Message Date
creatixchu
2363ef01eb feat(web): render a plan review as a decision card, not a quiz
The Web composer now renders a request that declares the `plan-review` intent
as its own surface: the waiting-approval card language — amber "Plan review"
strip, the plan as the scrolling markdown body, the question as the card's
accessible name — over one decision row of Chat about it / Refuse / Approve.
Gone from that surface are the 1/1 pager, the numbered radio rows, the custom
answer row, and Skip/Submit, which made approving a plan read as sitting an
exam.

Approve and Refuse answer with the asker's own option labels and keep its
descriptions as tooltips; Chat about it cancels the request so the composer
returns and the user can simply say what they want. Copy is bilingual under the
existing `question` namespace.

The shape choice lives inside the single composer entry rather than a second
chain registration, so the two surfaces cannot race the same carrier, and
`planReviewOf` falls back to the generic flow for any request it cannot render
as a card — the client sits downstream of a wire boundary and every request
must stay answerable.
2026-07-30 19:09:35 +08:00
creatixchu
89d30b0ef7 feat(user-interaction): declare a plan-review presentation intent on questions
A question may now carry `intent`, a tagged declaration that it IS a decision
of a known shape, so a UI that recognises the tag can present it as such
instead of as a generic option list. The one member is
`{ kind: 'plan-review', approve }`, which plan-mode sets on the exit_plan_mode
review.

An intent shapes presentation only: a UI honouring it answers with the same
option labels a generic UI would send, so the tool reads one answer shape
either way, and a UI that does not know the tag renders the generic flow.
`approve` names the affirmative option rather than relying on option order;
since no type can tie that label to the question's own option list, `ask()`
rejects a mismatch as BAD_INTENT, and the wire schema rejects an unknown tag
outright rather than silently rendering generic.

plan-mode also stops reporting a dismissed review as "the user cancelled
ask_user_question" — a tool it never called. A dismissal now tells the model
the user took the turn back to speak, and to stay in plan mode and wait; every
other ask failure keeps its own message.
2026-07-30 19:09:19 +08:00
kingwl
3d6cacc59b Merge remote-tracking branch 'origin/master' into codex/composer-dock-stacking
# Conflicts:
#	packages/client/ui-conversation/README.i18n.yaml
2026-07-30 17:35:22 +08:00
kingwl
abf498b8dc fix(web): align composer context stack 2026-07-30 17:26:44 +08:00
imccyu
4cd5745b94 Merge branch 'master' into codex/details-default-closed 2026-07-30 17:14:51 +08:00
imccyu
34d5f8f2e2 Merge branch 'master' into feat/ask-question-gui 2026-07-30 16:55:54 +08:00
imccyu
34c124585a fix: test 2026-07-30 16:46:50 +08:00
Tianyi Cui
9e679c89b6 Merge branch 'master' into feat/session-inherited-boundary 2026-07-30 16:30:42 +08:00
imccyu
f88d324f01 Merge branch 'master' into codex/details-default-closed 2026-07-30 15:53:01 +08:00
imccyu
69a58ddd6f Merge branch 'master' into feat/ask-question-gui 2026-07-30 15:50:59 +08:00
imccyu
17fea637d5 Merge branch 'master' into codex/details-default-closed 2026-07-30 15:40:36 +08:00
imccyu
e184b9561a Merge branch 'master' into feat/ask-question-gui 2026-07-30 15:36:22 +08:00
Hypatia May
30667e1eb9 Merge remote-tracking branch 'origin/master' into feat/session-inherited-boundary 2026-07-30 15:34:55 +08:00
imccyu
925cb0b315 feat(web): plan chip as an always-visible pressed-state toggle
fix: plan button add label
2026-07-30 15:33:45 +08:00
Hypatia May
8527137230 refactor(session): rename the seed boundary to end-seed 2026-07-30 15:32:06 +08:00
imccyu
245aeb414c feat(web): workspace header hover card with cwd and creation time 2026-07-30 15:29:12 +08:00
imccyu
4c33ca8bec fix: hero layout when no-workspace 2026-07-30 15:25:50 +08:00
Tianyi Cui
2296065c51 Merge branch 'master' into worktree/persistent-bash-str-replace-editor 2026-07-30 15:22:19 +08:00
Tianyi Cui
b21f13baa1 test: update tool agent fixtures for inbox API 2026-07-30 15:21:42 +08:00
Tianyi Cui
2550882875 Merge branch 'master' into worktree/persistent-bash-str-replace-editor 2026-07-30 15:19:27 +08:00
imccyu
6ea1238714 docs(web): the composer bar is one session-maybe slot, not a swapped pair
fix(web): keep one composer bar DOM across the no-workspace transition

The composer.bar slot moves from session to session-maybe scope: with no
current session the entry still mounts, the machine faces (keyboard, stop,
command) arrive undefined, and the bar renders its normal DOM inert via the
disabled owner prop. DisabledInputBar and its parallel tree are gone, so the
textarea node survives the cold-start workspace pick instead of flashing
through a remount. A blank session whose workspace was deleted takes the
same inert path through owner props.

test(web): add the composer DOM-continuity acceptance probe

Drives a real dsh web server with headless chromium through the cold-start
-> pick-workspace -> type flow and asserts the composer textarea is the
same DOM node throughout (a marker property must survive). Rerun
prerequisites are in the header comment.

docs(web): session-maybe identity is adoption, not hold-forever

fix(web): session-maybe entries adopt the first session, then remount like strict entries

A session-maybe entry used to keep one React instance across every
transition, so component-local state leaked between sessions once the
composer bar moved to that scope (PermissionSelect's optimistic pick, the
IME composition guard). Identity is now adoption: an incarnation born
session-less holds through the arrival of the first session (the blank
shell's DOM survives the workspace pick), and afterwards behaves exactly
like a strict session entry — a switch or a drop to no-session remounts,
clearing local state by construction. The child key is an incarnation
counter kept in the stable outlet wrapper via render-phase setState.

chore: knip knows the root acceptance probe's playwright dependency

scripts/hero-composer-dom-continuity.mjs resolves playwright through
apps/web's devDependency tree (createRequire), which knip cannot follow;
ignore it at the root workspace.
2026-07-30 15:18:06 +08:00
Hypatia May
e8f0934bc2 Merge remote-tracking branch 'origin/master' into feat/session-inherited-boundary 2026-07-30 15:14:16 +08:00
imccyu
6c7520c652 Merge remote-tracking branch 'origin/master' into mergebot/pr883
# Conflicts:
#	apps/web/tests/snapshots/question-composer/answered.expected.md
#	apps/web/tests/snapshots/question-composer/ui.expected.md
2026-07-30 15:04:59 +08:00
imccyu
03936cb320 Merge remote-tracking branch 'origin/master' into mergebot/pr883
# Conflicts:
#	packages/client/ui-question/package.json
#	packages/client/ui-question/src/client/QuestionComposer.tsx
#	packages/client/ui-question/src/client/contract/slots.ts
#	packages/client/ui-question/src/client/index.ts
#	packages/client/ui-question/src/client/locales.ts
#	packages/client/ui-question/tests/browser-plugin.spec.ts
#	packages/client/ui-question/tests/question-composer.spec.tsx
2026-07-30 15:01:10 +08:00
imccyu
5c2fc03d8f Merge branch 'master' into codex/details-default-closed 2026-07-30 14:50:50 +08:00
Hypatia May
b257ed5e8a docs(session): make the boundary's position and ownership conditional
Documentation only; no behavior change.

`firstLiveSeq`'s JSDoc still stated the boundary sits at that seq
unconditionally. Verified reachable on a plain production path: pick up a log,
do no work, pick it up again — the seed already ends in a boundary, so it is
not re-marked and `events[firstLiveSeq]` is undefined. Both that claim and the
firehose-gap sentence are now conditional, with the locate rule ("scan for the
last boundary") matching what types.ts already said.

`repair.ts`'s header claimed this module supplies the boundary. It does not —
the constructor does; this module supplies the activity read that must skip it.
Reworded, and it now names the closer timestamp leak, which is the one real
coupling that justifies `lastActivityTime` living beside the repair synthesis.

Recorded that `Session`'s constructor is the boundary's only legitimate writer,
since the invariant companion constrains nothing and a plugin-side append would
silently turn live brackets below it into dead history.
2026-07-30 14:46:38 +08:00
_Kerman
df25ca41dc Merge remote-tracking branch 'github/master' into xtr/fix-trajectory-scroll-layering 2026-07-30 14:45:16 +08:00
_Kerman
c0b8fea4c8 fix(ui): contain trajectory scrolling and overlays 2026-07-30 14:45:07 +08:00
kingwl
4ef3e60d57 fix(web): keep details closed by default 2026-07-30 14:42:39 +08:00
imccyu
ac37caa1ee Merge branch 'master' into worktree-fetest 2026-07-30 14:31:44 +08:00
Hypatia May
3e57bd3d0b chore(session): re-record the pairing and catalog fixture after the master merge 2026-07-30 14:21:04 +08:00
Hypatia May
9e6f251a4c Merge remote-tracking branch 'origin/master' into feat/session-inherited-boundary
# Conflicts:
#	examples/acp-agent/tests/snapshots/cordis-inspect-jsdoc/session.jsonl
#	packages/host/apiproxy/README.i18n.yaml
#	packages/host/apiproxy/src/api-proxy.ts
2026-07-30 14:20:35 +08:00
Hypatia May
39ebd8f745 fix(session): close the review gaps the boundary opened
- `SessionSummary.updatedAt`'s wire doc still said "Persisted file mtime",
  which stopped being true for attached sessions.
- The core invariant let `session/inherited` fall through the merge-extensible
  default. It is core-owned, so it gets an explicit case; an unbalanced seed
  legally places it inside an open turn, which the relation permits.
- The Agent Note claimed the boundary reaches disk via `live.pending`/
  `scheduleDrain`. Verified false: the constructor append precedes `enter()`,
  so it never publishes on `session/event` and rides the creation seed instead.
  Attaching is therefore a write where none happened before — recorded, since
  only `load()` stays a pure read.
- The deferred-index proposal asserted this change documented the cold-mtime
  skew on `dsh-host-apiproxy`. It did not; the README entry now exists.
- `firstLiveSeq`'s firehose gap runs through its own seq, not below it.
- The boundary is not always at `firstLiveSeq` (the idempotence guard), so
  consumers scan for the last one.
- `lastActivityTime` excludes by type, so a pickup time still leaks onto a
  synthetic closer when a boundary ends an open turn. Documented.
- Pin the fork claim end-to-end: a child inherits a still-running parent's
  open bracket below its own boundary, while the parent has none. Fails if the
  write moves back to the load path.
- Fix the telemetry title that contradicted its own assertions.

The `/status` call site cannot be pinned the way the other two are: the
command appends its own `command/run` before rendering, so the boundary is
never the log tail there. Its fixture now at least renders over a
boundary-bearing log.
2026-07-30 13:59:08 +08:00
imccyu
4869e0bbfc Merge branch 'master' into worktree-fetest 2026-07-30 13:09:53 +08:00
imccyu
1b84126f70 Merge branch 'master' into worktree/short-default-labels 2026-07-30 13:08:34 +08:00
imccyu
20cac781a2 Merge branch 'master' into worktree-fetest 2026-07-30 12:56:54 +08:00
imccyu
432a64ef2f Merge branch 'master' into worktree/short-default-labels 2026-07-30 12:56:11 +08:00
imccyu
01324f9167 Merge branch 'master' into fix/input-ui 2026-07-30 12:55:57 +08:00
Tianyi Cui
cea5e868ff Merge remote-tracking branch 'origin/master' into worktree/retarget-pr831-20260729 2026-07-30 12:21:14 +08:00
imccyu
9cb9a3e767 Merge branch 'master' into worktree-fetest 2026-07-30 12:20:27 +08:00
imccyu
b44318b03d Merge branch 'master' into fix/input-ui 2026-07-30 12:20:01 +08:00
Tianyi Cui
d37b192aa9 Merge branch 'master' into fix/workspace-instruction-frame-metadata 2026-07-30 12:16:41 +08:00
Tianyi Cui
3ecd4a569a test(skill-local): cover root unlink rewatch 2026-07-30 12:02:21 +08:00
Hypatia May
a00786362f refactor(session): drop the unused predicate helper and tighten the docs
`isInheritedSeq` had no production caller — only its own tests — so it was
a public core export shaped by nothing. A bracket owner reads the boundary
positionally; the helper belongs with the compaction seam, where a real
consumer decides its signature.

Also condense the `session/inherited` and `lastActivityTime` docs.
2026-07-30 12:01:45 +08:00
imccyu
6e99027917 Merge remote-tracking branch 'origin/master' into mergebot/pr937
# Conflicts:
#	packages/client/ui-conversation/README.i18n.yaml
#	packages/client/ui-conversation/src/client/queue/QueueDock.module.css
2026-07-30 11:59:59 +08:00
Tianyi Cui
3f195f1dd1 Merge remote-tracking branch 'origin/master' into codex/experimental-plugin-group-note 2026-07-30 11:57:55 +08:00
imccyu
b523a04af8 Merge remote-tracking branch 'origin/master' into worktree-fetest 2026-07-30 11:51:09 +08:00
Tianyi Cui
c0474d5289 Merge branch 'master' into codex/experimental-plugin-group-note 2026-07-30 11:46:04 +08:00
Tianyi Cui
ecb43469af Merge branch 'master' into fix/workspace-instruction-frame-metadata 2026-07-30 11:45:00 +08:00
imccyu
02a9d4113e Merge remote-tracking branch 'origin/master' into worktree-fetest 2026-07-30 11:40:34 +08:00