Skip to content

workspaces/chat: usability polish (rolling)#183

Merged
luokerenx4 merged 8 commits into
masterfrom
dev
May 13, 2026
Merged

workspaces/chat: usability polish (rolling)#183
luokerenx4 merged 8 commits into
masterfrom
dev

Conversation

@luokerenx4
Copy link
Copy Markdown
Contributor

@luokerenx4 luokerenx4 commented May 13, 2026

Summary

Rolling PR for the next wave of Workspaces + Chat usability iterations
following beta.5, plus retirement of pre-workspace subsystems whose
problems the workspace architecture has dissolved (Brain, Diary,
OpenClaw + browser tool). Per-session contributions append below as
new commits land — don't expect this body to stay stable.

Per-session contributions

2026-05-13 — Retire OpenClaw + bundled browser tool

The src/openclaw/ subtree (188 files, 28,151 lines, frozen legacy)
existed solely to back one AI tool: browser, wrapping the OpenClaw
Browser Relay Chrome extension. Same architectural pattern as the
Brain / Diary retirement earlier today — workspaces dissolve the need
for OpenAlice to bundle a heavy in-process subsystem when the
workspace itself can host the capability per-task via MCP.

Users who want browser control now install @playwright/mcp (or
equivalent) into the workspace where they actually need it. Scoped to
the task, not a global tool on every Alice surface.

Removed:

  • Entire src/openclaw/ subtree (browser/, gateway/, agents/,
    sessions/, terminal/, infra/, plugins/, channels/, routing/, cli/,
    process/, media/, security/, config/, logging/, utils/, shared/)
  • src/tool/browser.ts (Vercel AI SDK wrapper)
  • main.ts registration + SettingsPage 'browser' tool-group label
  • 8 production deps (chalk, json5, undici, file-type, sharp, express,
    tslog, playwright-core) + @types/express dev-dep — confirmed
    openclaw-only via strict import grep. Net: 21 packages out of the
    lockfile
  • All anachronistic "OpenClaw" references in CLAUDE.md /
    project-structure.md / mcp-ask-connector.md / source comments
    (mcp-export, media, agent-event, mcp-ask-plugin). The multi-modal
    AgentToolResult wire format lives on past openclaw and is no longer
    branded as such

BREAKING (MCP): AI tool browser (16 actions + 11 act sub-actions

  • Chrome Extension Relay) no longer exposed via the MCP server.
    Migration path: install @playwright/mcp into the workspace that
    needs browser control. The workspace's MCP config is per-spawn, so
    the capability is scoped to the task that actually needs it instead
    of being a global Alice tool.

Key commits: 0304c6d, d42aac7, 91a08d2
Net diff: −28,613 lines

2026-05-13 — Retire Brain (frontal-lobe) + Diary

The frontal-lobe note system existed to maintain self-consistency
across compacted chat sessions; the Diary dashboard existed as the
single-Alice-loop status feed. Both predate workspaces. With workspaces
now the primary substrate — each workspace owns its own scrollback,
transcript, working tree, and CLAUDE.md — both problems dissolve:
"want consistency? write a markdown file in the workspace"; "want to
see what Alice is doing? open the workspace's transcript". The single-
self assumption that made the de-se principle coherent doesn't hold
under N parallel workspaces.

Removed:

  • src/domain/brain/, src/tool/brain.ts, src/webui/routes/brain.ts,
    ui/src/components/BrainSidebar.tsx, ui/src/api/brain.ts
  • src/webui/routes/diary.ts + spec, ui/src/pages/DiaryPage.tsx,
    ui/src/api/diary.ts, the kind: 'diary' ViewSpec entry, the Diary
    row in the chat sidebar, /diary route, /api/diary mount
  • main.ts brain wiring + formatRelativeAge helper; getInstructions
    simplified to persona-only
  • SettingsPage brain tool-group label

Retained: data/brain/persona.md and data/brain/heartbeat.md (still
read by workspace bootstrap + persona route + heartbeat default
override). data/brain/ directory stays — it's now just the home for
those two override files.

Heartbeat itself is untouched. Its real downstream is the notifications
system (notify_user → NotificationsStore), not Diary. The
SessionStore('heartbeat') JSONL keeps being written by
agent-work-listener — orphan but harmless, separate decision.

Migration 0006_retire_brain deletes the two leftover brain-state
files (data/brain/{commit.json,frontal-lobe.md}) on next boot.
ENOENT-tolerant + idempotent.

Follow-up fix: bumped Zustand workspace store version: 2 → 3 so users
with a Diary tab open in localStorage discard the stale state on next
load rather than crashing on an unknown kind: 'diary'.

BREAKING (MCP): three brain tools no longer exposed via the MCP
server — getFrontalLobe, updateFrontalLobe, getBrainLog. External
integrations calling these need a migration path, typically a
workspace-local markdown file edited via the CLI's own read/write tools.

Key commits: 25f9532, 0a10b3f, 756d1bf, b75781c

2026-05-13 — Paused-session view: faux-TUI backdrop

The right pane for a paused session was a bare "Resume" button on a
panel — clear if you know what "resume" means, opaque otherwise.
Replaced with a two-layer composition:

  • Faux-TUI backdrop: heavily blurred (5px) + dimmed mock of an
    agent-CLI terminal. Titlebar, prompt boxes, bullet responses,
    * Brewed for Ns status lines, bottom prompt + statusbar. Structural
    Unicode characters (›, •, *, ▶▶, ●) partially survive the blur and
    carry the "this is a terminal" tell; body text blurs into soft
    horizontal bands. Static placeholder for every session — we can't
    show real content because agent-CLI scrollback isn't persisted on
    pause (the CLI re-renders its own transcript on resume).
  • Centered Resume card: radial vignette pushes focus to the
    middle. Copy flipped from Resume to Continue conversation with
    a MessageSquare icon. Meta (agent / created / transcript hint)
    tucked under a divider below the CTA.
  • Shell-template sessions keep the existing scrollback-restore hint.

Key commits: 852f1d5

Full commit log

91a08d2 chore(docs): scrub openclaw references after subtree removal
d42aac7 chore(deps): drop openclaw-only dependencies
0304c6d chore: retire openclaw + browser tool
b75781c fix(tabs): bump persist version after retiring diary kind
756d1bf chore(migration): 0006 — prune brain commit artifacts
0a10b3f chore: retire Brain — frontal-lobe + tools + dashboard
25f9532 chore: retire Diary surface
852f1d5 feat(workspaces/ui): paused-session view — blurred faux-TUI backdrop

Test plan

  • tsc --noEmit clean (backend + UI) after each commit
  • pnpm test passes — 88 files, 1676 tests
  • Backend smoke test: tool-center registers 46 tools (down from 50
    pre-retirement — Brain 3, Browser 1, leaving 46), all subsystems
    (snapshot / cron / news-collector / listener-registry) start
    cleanly. Net dep tree shrinks by 21 packages.
  • Paused codex/claude session: backdrop visible behind centered card
  • User to confirm visual feel at full viewport size
  • Frontend renders cleanly after Diary/Brain removal (regression
    fix b75781c verified by user)

🤖 Generated with Claude Code

Ame and others added 8 commits May 13, 2026 20:42
The paused-session right pane used to be a bare "Resume" button on a
panel — useful if you already know what "resume" means, opaque if
you don't. Replace with a two-layer composition that telegraphs
"paused conversation" visually:

1. **Faux-TUI backdrop** — a heavily-blurred, dimmed mock of an
   agent-CLI terminal (titlebar, prompt boxes, bullet responses,
   `* Brewed for Ns` status lines, bottom prompt + statusbar). It's
   static placeholder content for every session; the structural
   Unicode characters (›, •, *, ▶▶, ●) partially survive the 5px
   blur and give the "this is a terminal" tell, while the body text
   blurs into soft horizontal bands. We can't show the real
   conversation — agent-CLI scrollback isn't persisted across pause
   (the CLI re-renders its own transcript on resume) — so this is
   about telegraphing the *shape* of what's paused, not the content.

2. **Resume card** centered on top, with radial vignette pushing
   focus inward. Copy: "Continue conversation" + MessageSquare
   icon. Meta (agent / created / transcript hint) tucked under a
   divider below the button so the CTA reads first.

For shell-template sessions the hint about scrollback restore is
preserved.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The Diary dashboard existed as the single-Alice-loop status feed —
"what did the heartbeat cycle do" rendered against `SessionStore('heartbeat')`
+ `agent.work.*` filtered by source=heartbeat. With workspaces now the
primary substrate, each workspace owns its own transcript and the
cross-cut Diary view became redundant: the notifications system handles
the actual push surface, and per-workspace scrollback handles the
inspect-state surface. Diary itself was passive polling that fired
roughly never in practice.

Removed:
- src/webui/routes/diary.ts + spec
- src/webui/plugin.ts: /api/diary mount
- ui/src/pages/DiaryPage.tsx, ui/src/api/diary.ts, api/index registration
- ui/src/tabs/types.ts: `kind: 'diary'` from ViewSpec
- ui/src/tabs/registry.tsx: DiaryPage import + diaryModule + VIEWS entry
- ui/src/tabs/UrlAdopter.tsx: /diary route
- ui/src/components/ChatChannelListContainer.tsx: Diary sidebar row
- Diary mentions in App.tsx / ActivityBar.tsx / MarkdownContent.tsx /
  agent-work-listener.ts comments
- tabs store spec: diary scenarios → news (same shape)

Note: `SessionStore('heartbeat')` continues to be written by the
agent-work-listener — that's a separate decision (orphan but harmless).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The frontal-lobe system existed to maintain self-consistency across
compacted chat sessions: Alice wrote de-se notes to herself that
survived compaction and got re-injected into the next round's system
prompt with a "written Nh ago" cue. With workspaces as the primary
substrate, the problem dissolves — each workspace owns its own
scrollback + transcript + working tree, so consistency comes from
"write a markdown file in the workspace" rather than a single global
note threading across sessions. The single-self assumption that made
the de-se principle coherent doesn't hold under N parallel workspaces.

Removed:
- src/domain/brain/ (Brain class, types, index)
- src/tool/brain.ts (getFrontalLobe / updateFrontalLobe / getBrainLog
  tools — MCP-exposed, see PR description)
- src/webui/routes/brain.ts + /api/brain mount
- ui/src/components/BrainSidebar.tsx, ui/src/api/brain.ts
- src/main.ts: brain wiring, BRAIN_FILE / FRONTAL_LOBE_FILE constants,
  formatRelativeAge helper, brain tool registration. `getInstructions`
  is now just `readFile(PERSONA_FILE)` — no more frontal-lobe injection
- ui/src/pages/SettingsPage.tsx: 'brain' tool-group label (the group no
  longer registers)
- TODO.md: "Brain commits" line from the TimeView replay-asset inventory

`data/brain/persona.md` and `data/brain/heartbeat.md` stay where they
are (still read by main.ts, workspace bootstrap, and the persona route).
The leftover `data/brain/commit.json` and `data/brain/frontal-lobe.md`
files are cleaned up by migration 0006 (next commit).

BREAKING (MCP): three brain tools are no longer exposed via the MCP
server. Any external integration calling getFrontalLobe /
updateFrontalLobe / getBrainLog should plan a migration path —
typically a workspace-local markdown file edited via the CLI's own
read/write tools.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Cleans up the two leftover brain-state files after the Brain subsystem
was retired in the preceding commit:

  - data/brain/commit.json     (BrainExportState — commit history)
  - data/brain/frontal-lobe.md (latest frontal-lobe snapshot)

persona.md and heartbeat.md stay where they are — both still in active
use by main.ts (persona injection), workspace bootstrap, and the
persona route.

Idempotent via ENOENT-tolerance: re-running on a clean tree is a no-op.
Affects files outside data/config/ so this uses raw fs/promises (same
pattern as 0004); ctx helpers are config-scoped.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The previous commit removed `kind: 'diary'` from ViewSpec but didn't
bump the Zustand persist version. Any user who had a Diary tab open
(everyone who used the feature) would crash on next load: localStorage
restores a tab with `spec.kind === 'diary'`, getView('diary') returns
undefined, UrlSync's `view.toUrl(spec)` throws.

The store's own comment calls this out — "Schema bumps clear stored
state (no migrate function) — loud-fail beats silent migration when
shape changes." Bumping version 2 → 3 triggers Zustand's discard path:
on load, version mismatch with no migrate function → start fresh.

Cost: users lose their open-tab restoration once. Better than a hard
crash for anyone who had Diary open at the moment of the upgrade.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The OpenClaw subsystem (28,151 lines / 188 files in src/openclaw/) was
frozen legacy that only existed to back a single AI tool — `browser` —
via the OpenClaw Browser Relay Chrome extension. With workspaces as
the primary substrate, the browser-tool capability is now better
served by per-workspace MCP integrations: users who want browser
control install @playwright/mcp (or equivalent) into the workspace
they care about, scoped to that task, without OpenAlice bundling a
heavy browser stack into the trading core.

This is the same architectural pattern as the Brain / Diary retirement:
workspaces dissolve a problem that previously required a bespoke
in-process subsystem.

Removed:
- `src/openclaw/` — entire 188-file subtree (browser/, gateway/,
  agents/, sessions/, terminal/, infra/, plugins/, channels/,
  routing/, cli/, process/, media/, security/, config/, logging/,
  utils/, shared/)
- `src/tool/browser.ts` — Vercel AI SDK wrapper
- main.ts: createBrowserTools import + toolCenter.register('browser')
- SettingsPage: 'browser' tool-group label

Retained:
- Comment-level "OpenClaw format" mentions in mcp-export / media /
  agent-event / mcp-ask-plugin — they describe a wire-format shape
  that lived on past openclaw and is now just "the tool-result format
  we accept". Cleaned up in a follow-up commit.

BREAKING:
- AI tool `browser` (16 actions + 11 act sub-actions + Chrome
  Extension Relay support) no longer exposed via MCP. Migration path:
  install @playwright/mcp into the workspace that needs browser
  control. The workspace's MCP config is per-spawn, so this is
  scoped to the task that actually needs it instead of being a
  global tool on every Alice surface.

Deps that became orphaned are dropped in the next commit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
After the openclaw subtree was deleted, the following deps had zero
remaining consumers in the codebase. Confirmed by strict import grep
(every `from '<dep>'` site was inside src/openclaw/).

Production:
- chalk          (openclaw/logging console formatting)
- express        (openclaw/browser/server.ts HTTP bridge)
- file-type      (openclaw/media MIME detection)
- json5          (openclaw config parsing)
- playwright-core (openclaw/browser Playwright driver)
- sharp          (openclaw/media image-ops)
- tslog          (openclaw/logging primary logger — OpenAlice uses pino)
- undici         (openclaw HTTP outbound)

Dev:
- @types/express

Net: 21 packages removed from the lockfile.

pnpm.overrides for express-rate-limit / path-to-regexp / follow-redirects
left in place — they're declarative and inert when the named package
isn't in the tree, so removing them is a cleanup for a separate pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
CLAUDE.md / project-structure.md: drop the openclaw/ tree entry and
the now-defunct tool/brain.ts + tool/browser.ts lines. Retag
data/brain/ description as "Persona + heartbeat user-override prompts"
(more accurate now that the Brain commit/frontal-lobe artifacts are
gone).

docs/mcp-ask-connector.md: rebrand the "OpenClaw integration" example
as a generic External Agent integration; OpenClaw was the original
prototype caller but the connector is meant to serve any orchestration
agent that speaks MCP. Also fix the tool inventory ("trading, analysis,
brain" → "trading, analysis, market" — brain tools are gone).

Source comments: drop OpenClaw-as-source-of-format references in
mcp-export.ts, media.ts, agent-event.ts, mcp-ask-plugin.ts. The wire
format (`{ content: [...], details: {...} }`) lives on past openclaw
and is just our multi-modal AgentToolResult shape now.

TODO.md heartbeat-as-template warning: keep the warning, drop the
"OpenClaw-era" branding (the point is structural, not historical).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@luokerenx4 luokerenx4 merged commit ed7d47a into master May 13, 2026
2 checks passed
luokerenx4 pushed a commit that referenced this pull request May 15, 2026
Workspace landed (PR #182, #183) and is now reshaping the chat
surface end-to-end — the legacy single-session Traditional Chat is
being demoted to a fallback for connector-driven flows, the new
Workspace + Inbox path is the recommended one, and the inbox_push
MCP route gave AI agents a structurally clean way to push back to
the user. None of that is "patch-level" — it's a generation shift
from 0.10 → 0.20.

Skipping 0.11–0.19 deliberately so the version reflects how much of
the original 0.10 chat design has been replaced rather than how many
incremental changes shipped.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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