Skip to content

fix(acp): show session startup feedback and share initial metadata - #3735

Open
kev1n77 wants to merge 1 commit into
GCWing:mainfrom
kev1n77:codex/acp-session-startup-feedback
Open

kev1n77 wants to merge 1 commit into
GCWing:mainfrom
kev1n77:codex/acp-session-startup-feedback

Conversation

@kev1n77

@kev1n77 kev1n77 commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Creating an external ACP conversation closes the menu and waits for the agent process to initialize before opening a session. Its lifecycle was recorded as silent notifications, so both the wait and startup failures could look like a failed click. Show persistent startup feedback with a spinner, expose the actual failure with a retry action, and coalesce duplicate creation requests within the same device activation and workspace.

Share the initial model/options and slash-command metadata read on newer hosts. This removes a duplicate RPC and metadata drain during concurrent first-load requests. Add phase timing logs for persistence, transport startup, initialize, session setup and metadata loading; no end-to-end latency reduction has been measured.

Type and Areas

Type: bug fix / UI / performance

Areas: Web UI ACP lifecycle, ACP client metadata response and diagnostics, locales, focused tests and verification guides.

Motivation / Impact

  • Startup remains visible before a session tab exists, followed by a distinct session-initialization message.
  • Failed creation or initialization shows the underlying error and supports retry. Command lists recover when metadata initialization is retried.
  • Request identities include the device activation, workspace and agent. Switching devices or closing a session view removes stale feedback and prevents late results from updating another view.
  • A completed metadata snapshot is not cached. The additive optional availableCommands field advertises combined-read support; older hosts retain the commands endpoint fallback, including when the combined result is an empty list.

Verification

After rebasing onto upstream/main at 6518444112:

  • pnpm run lint:web — passed, 0 errors (18 existing warnings).

  • node scripts/run-vitest.mjs run --maxWorkers=50% src/flow_chat/components/ModelSelectorAcpMode.test.tsx src/app/layout/AcpSessionNotifications.test.tsx src/flow_chat/hooks/useAcpSlashCommands.test.ts (from src/web-ui) — 42 tests passed, including same-device reactivation and cross-device stale-result protection.

  • pnpm --dir src/web-ui run test:run src/app/layout/AcpSessionNotifications.test.tsx src/flow_chat/services/FlowChatManager.test.ts src/infrastructure/api/service-api/ACPClientAPI.test.ts src/flow_chat/components/ModelSelectorAcpMode.test.tsx src/flow_chat/hooks/useAcpSlashCommands.test.ts src/app/layout/WindowResizeLayout.test.tsx — 6 files, 100 tests passed.

  • pnpm run i18n:audit — passed with zero warnings.

  • git diff --check upstream/main...HEAD — passed.

  • pnpm run check:web — blocked by four existing typography violations in DeviceWorkspaceSections.scss and SceneBar.scss. Both files are identical to upstream/main and outside this PR.

  • pnpm --dir src/web-ui exec tsc --noEmit --pretty false — blocked by three existing missing @/generated/api diagnostics in websocket-adapter.ts and ConfigAPI.ts.

  • cargo test -p openbitfun-acp --no-default-features --features client,openbitfun-core/git --lib client::session_options::tests — 10 tests passed before rebase, including legacy payload round-trip coverage. The post-rebase rerun was stopped while waiting for the build lock held by an active desktop development build; that development process was left running.

Reviewer Notes

The single change commit is rebased onto current upstream/main. Conflict resolution retains main's WindowResizeLayout and its updated session-tab guide alongside the ACP changes.

DOM/API fixtures cover delayed startup, errors, retry, duplicate creation, old-host responses and simulated SSH/Peer identities. Native WebView rendering, live provider cold-start timing, and live Remote Workspace, Remote Control, Peer Device Mode and Detached Dispatch scenarios have not been exercised. Existing remote command capability declarations remain unchanged.

No persisted session/config migration is required; rollback is a normal revert. English, Simplified Chinese and Traditional Chinese strings are included.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable.

@kev1n77
kev1n77 force-pushed the codex/acp-session-startup-feedback branch from 8c208d5 to 10fbd82 Compare November 5, 2026 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant