Skip to content

feat: Use ACP to refactor chat UI and session management; add workspace feature#1158

Merged
su8su merged 20 commits into
mainfrom
dev-zx
Jul 13, 2026
Merged

feat: Use ACP to refactor chat UI and session management; add workspace feature#1158
su8su merged 20 commits into
mainfrom
dev-zx

Conversation

@z0gSh1u

@z0gSh1u z0gSh1u commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Use ACP (Agent Client Protocol) instead of custom protocol for live chat, history session loading, tool cards and so on. This might avoid potential Chat UI bugs.
  • Support workspace (working directory) feature based on ACP's cwd standard.
  • Stablize file card and changes view during conversation.
  • Workspace file tree nows uses a React library and a icon map instead of homemade wheels.
  • Make the light theme color more neutral; the user message input now indicates the loading status more clearly.

Related Issue(s)

N/A

Type of Change

  • Bug fix
  • New feature
  • Documentation
  • Refactor
  • Other

Validation

Checklist

  • I ran relevant checks/tests locally.
  • I updated docs if behavior or interfaces changed.
  • I verified there are no unrelated changes in this PR.

z0gSh1u and others added 20 commits July 13, 2026 02:15
# Conflicts:
#	shared/i18n/locales/en/chat.json
#	shared/i18n/locales/ja/chat.json
#	shared/i18n/locales/ru/chat.json
#	shared/i18n/locales/zh/chat.json
#	src/pages/Chat/index.tsx
fix: avoid workspace-triggered chat history fanout

# Conflicts:
#	tests/e2e/chat-acp-inline-timeline.spec.ts

feat: refine workspace session UI
fix(chat): restore ACP question directory

fix(chat): cap question directory titles

fix(chat): improve question directory accessibility

fix(chat): refine question directory navigation

fix(chat): preserve question title graphemes
docs: add ACP file activity implementation plan

feat(chat): project OpenClaw file activities

feat(files): add workspace-scoped file access

fix(files): harden workspace-scoped access

feat(preview): scope tool-derived file access

fix(preview): key scoped loads by workspace

feat(chat): restore ACP file activity UI

fix(chat): allow focused changes to collapse

fix(chat): key change navigation by invocation

fix(chat): keep file projection renderer-safe

test(chat): cover ACP file activity flow

test(chat): address file activity review

test(chat): snapshot live ACP generation

fix(harness): run profile commands from repository root

test(sidebar): match generic load more label

test(chat): fix ACP prompt E2E baseline

docs(chat): explain ACP file activity semantics

fix(files): remove scoped shell actions

docs: align scoped preview plan

docs: clarify scoped preview boundary

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a7a1c13d58

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/pages/Chat/index.tsx
Comment on lines +422 to +426
await sendAcpPrompt({
sessionKey,
cwd: promptCwd,
message: text,
media,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge Update sidebar metadata after first ACP send

When this ACP prompt path succeeds for a locally-created New Chat, the code only acknowledges the backing ACP session; it never updates sessionLabels/last activity the way the legacy send path did. In that scenario the sidebar keeps showing the raw agent:...:session-* key and stale ordering until some later manual/session refresh. Please hydrate the label/activity from the sent text or trigger a session-summary refresh after the prompt succeeds.

Useful? React with 👍 / 👎.

Comment on lines +443 to +444
this.loadedSessionKey = null;
this.loadedAcpSessionId = null;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge Reload the active ACP session after child exit

When the ACP child exits while a session is open, this clears only the loaded ACP session fields. The renderer still believes the same active session/cwd is loaded, so the Chat reload guard stays false; the next send reaches sendPrompt and fails with ACP session is not loaded instead of reconnecting and reloading. Clear active session state and notify the renderer, or make the next prompt path reload the active session after reconnect.

Useful? React with 👍 / 👎.

@z0gSh1u
z0gSh1u requested a review from su8su July 13, 2026 02:18
@su8su

su8su commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

LGTM

@su8su
su8su merged commit ff9024f into main Jul 13, 2026
8 checks passed
@su8su
su8su deleted the dev-zx branch July 13, 2026 03:03
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.

2 participants