Skip to content

fix(web): bind first prompt to created session - #490

Merged
tt-a1i merged 7 commits into
openpi-dev:mainfrom
testikun:codex/issue-466-session-target
Sep 12, 2026
Merged

tt-a1i merged 7 commits into
openpi-dev:mainfrom
testikun:codex/issue-466-session-target

Conversation

@testikun

@testikun testikun commented Sep 8, 2026 •

Copy link
Copy Markdown
Collaborator

The first prompt for a workspace draft is now bound to the Session returned by native creation, rather than a previously selected Session. Creation returns a command-correlated Session identity; model selection and prompt admission revalidate that identity after asynchronous work. Fixes #466.

When the creation response is lost, the UI retries the same command ID and the serialized runtime returns the original receipt. Receipt replay does not activate a Session or emit a new transition. Receipts are scoped to the current Web host lifetime and bounded at 1,024 without eviction; cross-workspace reuse is rejected. This does not claim deduplication across host restarts.

Validation: bun run check passed; full Node 22 bun run test passed, including 134 Vitest tests at that run. Subsequent focused replay tests passed 57 runtime/Host tests and 61 store tests, including post-activation response loss, unchanged event cursor on receipt replay, and command identity retention. Current hosted CI and post-push independent approval gate merge.

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Sep 8, 2026

@tt-a1i tt-a1i left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at exact head 6bed11a. The core Session-target binding fix is correct and no P0/P1 was found, but this changes first-prompt Session identity and is therefore not on the low-risk auto-merge path.

Spec

[P2] An uncertain create response can still create a second blank Session. If the Host successfully activates a new Session but the HTTP response is lost, the catch path refreshes and resets selection while retaining workspaceDraft, then a manual retry sends a fresh creation command ID. Even if refresh observed the first Session, the next send can create another one. The existing creation-failure test models a pre-mutation throw only. Please preserve/reconcile the original creation identity, or make retries idempotently reuse it, and test post-commit response loss.

Standards

No actionable standards finding. The implementation otherwise keeps SessionManager authoritative and revalidates the receipt identity after async boundaries.

tt-a1i
tt-a1i previously approved these changes Sep 12, 2026

@tt-a1i tt-a1i left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed repaired head 582f096. Standards and Spec: the scoped P2 findings are addressed; no remaining P0/P1 or actionable small defect identified. Repository check and full-suite evidence are recorded in this review batch; targeted regressions cover the repair where applicable. This replaces my earlier findings against the old implementation. I pushed the repair, so this approval does not constitute the independent approval required after the last push. Current-head CI, current-main integration, and that independent approval remain merge gates.

tt-a1i
tt-a1i previously approved these changes Sep 12, 2026

@tt-a1i tt-a1i left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

追加修复:明确确认创建目标失活后使用新的 commandId 重试;响应丢失时继续复用原回执。SSE 重连保留业务错误提示。62项 store 测试和12项浏览器E2E通过;最终main集成check通过,完整CI正在运行。双线复审未发现P0/P1。此账户推送了修复,仍需另一维护者满足最后一次推送后的独立批准。

# Conflicts:
#	docs/design/README.md
#	tests/web/openpi-web.e2e.ts
#	web/dist/app.js
#	web/runtime/pi-runtime.ts
#	web/ui/src/store/web-store.ts
@tt-a1i
tt-a1i merged commit 0c66911 into openpi-dev:main Sep 12, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(web): 新建会话后的首条消息可被另一标签页改投其他工作区

2 participants