Skip to content

feat: session chat history view with message bubbles#278

Merged
mrcfps merged 16 commits intomainfrom
feat/session-chat-history
Mar 20, 2026
Merged

feat: session chat history view with message bubbles#278
mrcfps merged 16 commits intomainfrom
feat/session-chat-history

Conversation

@anthhub
Copy link
Copy Markdown

@anthhub anthhub commented Mar 19, 2026

Summary

  • Backend: Add GET /api/v1/sessions/{id}/messages endpoint in controller — reads JSONL session files directly from OpenClaw state dir and returns parsed user/assistant messages
  • Backend (legacy API): Add runtime session routes via OpenClaw WS RPC (sessions.list, chat.history) for SaaS path
  • Frontend: Rewrite sessions page as chat view with message bubbles (user right-aligned dark, assistant left-aligned light with brand avatar)
  • Sidebar: Add SidebarSession unified mapping layer, reduce polling to 10s
  • i18n: Add chat view translation keys (en + zh-CN)
  • Merge fixes: Resolve PR feat: OpenClaw WS config push & channel readiness feedback #274 conflicts, fix channel readiness API rename

Test plan

  • pnpm typecheck && pnpm lint passes
  • pnpm dev starts successfully
  • Sidebar shows sessions from controller (file-based)
  • Click session → chat view with user/assistant message bubbles
  • User messages: right-aligned, dark background
  • Assistant messages: left-aligned, light background with brand avatar
  • Chat auto-refreshes every 5s
  • Empty state shows when no messages
  • Graceful degradation when runtime unavailable

🤖 Generated with Claude Code

lefarcen and others added 12 commits March 19, 2026 00:25
- Rename channels: nightly-prod → beta, nightly-test → nightly
- New artifact naming: nexu-simplest-openclaw-desktop-{version}-{channel}-{arch}.{ext}
- Add latest artifacts: nexu-simplest-openclaw-desktop-latest-{channel}-{arch}.{ext}
- Patch latest-mac.yml to match new filenames for auto-update
- Remove desktop-nightly-test.yml, add desktop-beta.yml

Channel mapping:
- nightly: test environment (nexu.powerformer.net)
- beta: prod environment (nexu.io)
- stable: prod environment (nexu.io)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace all "Nexu Desktop" references with "Nexu" so that app.setName
matches the electron-builder productName.  This avoids userData path
drift — Electron derives the storage directory from app.name, and a
mismatch would silently move the data root on upgrade.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…nels

For nightly and beta builds, patch package.json version at build time
(e.g. 0.1.1 → 0.1.1-nightly.20260319) so each daily build has a
unique version and electron-updater can detect it as an update.

Stable channel is unchanged — uses the version from package.json as-is.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…channels

# Conflicts:
#	apps/desktop/main/index.ts
Avoid confusion with generic "test" / "prod" naming.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix Sentry DSN lookup to match renamed nexu-test/nexu-prod environments
- Add build-config.json generation to desktop-release.yml (was missing)
- Add checksum upload to R2 in desktop-build.yml (parity with release)
- Stagger cron: nightly UTC 00:00, beta UTC 18:00

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove duplicate app.setName("Nexu Desktop") / app.dock.show() calls
(merge artifact). Set app name to "Nexu" once before any getPath() calls
to avoid userData/logs path inconsistency.

Update CI check scripts to match the new logs/userData directory name.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…s endpoint

Replace the sidecar file-polling config sync with direct WS push using
OpenClaw's config.apply RPC. Config changes now take effect in <1s instead
of 5-15s.

Key changes:
- New openclaw-service.ts: unified WS communication module with pushConfig,
  getChannelsStatus, getChannelReadiness APIs
- publishPoolConfigSnapshot() now pushes config via WS after DB write
- Channel readiness endpoint (GET /channels/{id}/readiness) for frontend polling
- Frontend polls readiness after channel connect with progressive toast feedback
- Remove runPollLoop from gateway sidecar (config push replaces file polling)
- Various channel connection robustness fixes (transactions, upsert, etc.)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…channels

# Conflicts:
#	apps/web/src/pages/home.tsx
#	pnpm-lock.yaml
# Conflicts:
#	apps/desktop/main/runtime/manifests.ts
#	apps/desktop/scripts/prepare-pglite-sidecar.mjs
#	apps/web/lib/api/sdk.gen.ts
#	apps/web/lib/api/types.gen.ts
- Add chat history API: controller reads JSONL session files and exposes
  GET /api/v1/sessions/{id}/messages endpoint
- Add legacy API runtime session routes via OpenClaw WS RPC
- Rewrite sessions page as chat view with user/assistant message bubbles
  (user right-aligned dark, assistant left-aligned light with brand avatar)
- Add SidebarSession mapping layer for unified sidebar data source
- Reduce sidebar polling to 10s, chat history polls at 5s
- Add i18n keys for chat view (en + zh-CN)
- Fix merge issues: channel readiness API rename, import ordering

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Mar 19, 2026

Deploying nexu-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: da5a1d6
Status: ✅  Deploy successful!
Preview URL: https://2230ca77.nexu-docs.pages.dev
Branch Preview URL: https://feat-session-chat-history.nexu-docs.pages.dev

View logs

anthhub and others added 4 commits March 19, 2026 21:36
…isplay

- Load workspace root .env in controller for LiteLLM env vars
  (fixes desktop sidecar not reading LITELLM_BASE_URL/API_KEY)
- Inject LiteLLM provider and prefix bare model IDs with litellm/
  (fixes "Unknown model: anthropic/claude-sonnet-4")
- Infer session title and channelType from JSONL first user message
  (shows sender name instead of UUID in sidebar)
- Strip OpenClaw metadata blocks from user message display
  (removes Conversation/Sender metadata and timestamp prefixes)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Resolves conflicts in openclaw-service, pool-config-service,
sdk.gen, channel-connect-modal, inline-model-selector, switch,
i18n, index.css, workspace-layout, and home page.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mrcfps mrcfps merged commit 1885ff5 into main Mar 20, 2026
6 checks passed
@mrcfps mrcfps deleted the feat/session-chat-history branch March 20, 2026 04:35
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.

3 participants