Commit Graph

6 Commits

Author SHA1 Message Date
hypercross 57ffb35f2b feat: publish initial manifest on startup and improve UI focus
- Publish the existing session manifest via the broker on startup
- Automatically focus the new session input field when it is shown
- Prevent event propagation when clicking to create a new session
2026-07-08 00:08:12 +08:00
hypercross 6b5fcdc051 fix(cli): use async broker creation in journal server
Use `AedesFactory.createBroker()` instead of the constructor to ensure
persistence is properly initialized before handling connections.
2026-07-06 16:01:29 +08:00
hypercross 98c4a195e8 refactor: replace websocket-stream with native ws utility
Remove the `websocket-stream` dependency in favor of
`createWebSocketStream`
from the `ws` package. This simplifies the MQTT broker setup in the
journal server and removes unnecessary transitive dependencies.

Also improve the JournalPanel UI with smoother transitions and better
visibility handling.
2026-07-06 15:53:52 +08:00
hypercross 34d647d611 feat: implement websocket-stream for journal server
Integrate `websocket-stream` to handle MQTT broker upgrades in the
CLI and add granular connection status tracking to the UI.

- Add `websocket-stream` dependency
- Update CLI to use `websocket-stream` for socket upgrades
- Enhance `journalStream` store with `connectionStatus` and
  `connectionError` states
- Add visual connection status indicators to `App` and `JournalPanel`
2026-07-06 15:38:28 +08:00
hypercross 862ba9c01b feat: simplify journal connection via WebSocket upgrade
Refactor the journal server to run over WebSockets on the existing
HTTP server instead of a separate MQTT TCP port. This removes the need
for a separate port configuration and simplifies the connection flow
by auto-connecting to the current host.

- Remove `--mqtt-port` CLI option
- Attach Aedes broker to the HTTP server via WebSocket upgrade
- Update UI to remove manual broker URL and player name inputs
- Add "Content Source" access from the sidebar
- Update JournalPanel to auto-connect to the local server
2026-07-06 15:30:21 +08:00
hypercross 21f8fbcd0b feat: add MQTT journal server for session persistence
Implement a journal server that uses an Aedes MQTT broker to
persist stream messages to JSONL files and manage session metadata
via a manifest.

- Add `aedes`, `mqtt`, and `zod` dependencies
- Implement `createJournalServer` in `src/cli/journal.ts`
- Integrate journal server into the `serve` command
- Add `--mqtt-port` option to the CLI
- Add session lifecycle management (create, update, delete) via
  retained MQTT topics
2026-07-06 14:19:16 +08:00