Skip to content

feat: 0.15 Alpha compact VN-style companion panel - #75

Merged
Lucas1479 merged 7 commits into
mainfrom
codex/alpha-0.15-companion-panel
Sep 15, 2026
Merged

Lucas1479 merged 7 commits into
mainfrom
codex/alpha-0.15-companion-panel

Conversation

@Lucas1479

@Lucas1479 Lucas1479 commented Sep 14, 2026

Copy link
Copy Markdown
Member

What changes

Add an optional compact VN-style companion card for 0.15 Alpha. The Slice button opens the portrait and dialogue beside a selected Work preview; docking, dragging, closing and reconnecting preserve Host-owned window placement and presentation.

Companion panel in the speaking state

Local UI preview using the optional VN portrait cache and test presentation events. The still image captures the VOICE indicator and animated signal bars.

Fix the open card resetting to a welcome line after every spoken reply: speech ending keeps the just-spoken caption on screen. Empty subtitle cleanup and returning to standby no longer erase it, regardless of event order. Only the next non-empty subtitle replaces the line. Reopening/reconnecting also restores the latest caption, including speech received while closed. Retention lasts for the current bridge instance and is not saved chat history; wallpaper subtitles still clear normally.

The card shows VOICE with animated signal bars while speaking, then flat bars at standby, matching the existing VN card's visual language. Signals follow Host speaking state, not measured amplitude.

Existing portrait-cache and subtitle/emotion/speaking signals supply the display. Missing optional portraits retain a text avatar. Only an attached panel suppresses the matching wallpaper layers; closing or disconnecting restores them without stopping audio or Work. Atomic subscription replay and refreshed bridge credentials cover reconnection. Public macOS wallpaper and keyboard behavior remain intact.

Validation

  • Updated companion/reconnect Python selection: 7 passed, in .venv_cu124, in both the public worktree and integration workspace.
  • Electron projection/window-policy tests: 43 passed, including successive replies in an open card and both subtitle-clear/speech-stop orders; TypeScript/Vite build, Ruff and diff checks passed.
  • Chromium with the real local SSE handler verified retained-caption replay, live speech/standby animation, speech updates while closed, reopening and narrow layout. No page errors. The portrait/IPC fixture supplies optional media; this is not a packaged Electron docking or physical audio test.
  • Earlier platform selection: 6 passed, 1 skipped. Public source scan checked before push; hosted checks and packaged physical-window acceptance remain separate.

This standalone Draft targets public main. Routing is #74, ACP is #76 and Slice export review is #77. See companion behavior.

@Lucas1479
Lucas1479 marked this pull request as ready for review September 15, 2026 07:48
@Lucas1479
Lucas1479 merged commit 2d7fcc0 into main Sep 15, 2026
11 checks passed
@Lucas1479
Lucas1479 deleted the codex/alpha-0.15-companion-panel branch September 15, 2026 07:59
Lucas1479 pushed a commit that referenced this pull request Sep 15, 2026
This is a follow-up to #75.

This bug was found while testing the companion panel on macOS. Unlike
Windows/Linux, macOS uses a split-window architecture: the interactive
Canvas containing the W and portrait controls runs in a separate
wallpaperCanvasLifecycle.ts window, while the wallpaper scene is managed
by index.ts. PR #75 only authorized companion IPC from
electronSliceWindow, so requests sent from the macOS Canvas window were
rejected as unauthorized and returned false before reaching
CompanionPanel.toggle(), making the portrait button appear unresponsive.

Changes:

- Treat both the main Canvas and the separate Slice as trusted
companion-control surfaces.
- Keep the existing main-frame check for toggle requests and continue
rejecting unrelated renderer senders.
- Broadcast companion open/closed state to every live trusted surface so
duplicate controls remain synchronized.
- Add hover feedback to the portrait button so its interactive state is
visible.

The companion window remains a singleton, and the main process continues
to own authorization and lifecycle state.


Reproduced and tested on macOS 26.6.2 on Apple Silicon.

Co-authored-by: FDU-ZJN <FDU-ZJN@users.noreply.github.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