fabro/apps/fabro-web/app
Bryan Helmkamp 34996d630f
Give Ask Fabro sessions their own event log
Step 4 of the legacy executor deletion, second commit. Ask Fabro's
sessions were the last writer of `run_events`: a session's creation, its
turns and their messages, tool calls and endings went into the run's
legacy event log, keyed by the run's sequence. They now have a log of
their own.

- `run_session_events` (migration `2026091802`): one row per session
  event, numbered per session from 1, with the owning run, the turn, the
  event name and its properties. `RunSessionEventStore` appends under the
  write lock, lists a session from a sequence, names a session's owner
  from its creation event, deletes a run's sessions with the run, and
  publishes each committed event to its subscribers.
- `fabro_types::SessionEvent`: `seq`, `session_id`, `run_id`, `ts` and a
  flattened body (`event` naming the kind, `properties` its fields), with
  the same event names and property shapes the legacy events carried,
  so the web app and the CLI read the same JSON. The property structs
  move to `session_event`; `run_event::session` re-exports them under
  their old names until the legacy event log goes.
- The API: `GET /sessions/{id}/events` pages `PaginatedSessionEventList`
  by the session's own sequence, `GET /sessions/{id}/attach` replays and
  streams `SessionEvent` frames (subscribed before the replay, so no
  event falls between the two), the turn stream carries the same frames,
  and an interrupt answers with the recorded event. The session
  projection folds `SessionEvent`s; the legacy `find_session_owner` over
  `run_events` is gone.
- The CLI's `run ask` and the web app's session stream read
  `SessionEvent`; the web runtime no longer accepts the nested legacy
  envelope shape.

The two session resume tests in the server keep failing for a reason
this commit does not touch: Ask Fabro reconnects to the run's sandbox
from the projection's sandbox instance, which the Petri projection does
not carry yet (`VIEWS.md`, the `scope.acquired` gap).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-18 12:47:43 -04:00
..
components Remove the retry, rewind, fork and timeline endpoints and commands 2026-09-18 10:54:45 -04:00
data Read Usage in the web app and rename the Billing tab to Usage 2026-09-14 12:40:04 -06:00
hooks fix(web): harden build version detection 2026-07-25 15:15:25 -04:00
layouts fix(web): harden build version detection 2026-07-25 15:15:25 -04:00
lib Give Ask Fabro sessions their own event log 2026-09-18 12:47:43 -04:00
routes Remove the retry, rewind, fork and timeline endpoints and commands 2026-09-18 10:54:45 -04:00
test-fixtures/petri Merge branch 'petri-integration-api' into petri-integration 2026-09-18 01:39:53 -04:00
app.css fix: tighten Ask Fabro sidebar markdown spacing 2026-05-22 13:47:31 -04:00
entry.tsx fix(web): harden build version detection 2026-07-25 15:15:25 -04:00
install-api.test.ts feat(web): migrate to generated API client 2026-05-08 07:44:33 -07:00
install-api.ts feat(web): migrate to generated API client 2026-05-08 07:44:33 -07:00
install-app.test.tsx feat(install): enable only allowed sandbox providers 2026-06-02 18:39:31 -04:00
install-app.tsx feat(install): enable only allowed sandbox providers 2026-06-02 18:39:31 -04:00
install-config.test.ts fix(install): exclude openai-compatible from v1 setup 2026-04-19 11:43:38 -04:00
install-config.ts feat(install): redesign web wizard and scope dev token to PAT installs 2026-04-19 16:11:02 -04:00
install-flow.test.ts fix(install): exclude openai-compatible from v1 setup 2026-04-19 11:43:38 -04:00
install-flow.ts fix(install): exclude openai-compatible from v1 setup 2026-04-19 11:43:38 -04:00
install-query.ts Introduce approved effect hooks and migrate direct useEffect calls (#425) 2026-05-27 10:37:29 -04:00
install-router.test.tsx fix(install): mount wizard at root route 2026-04-24 12:59:16 -04:00
install-router.tsx fix(install): mount wizard at root route 2026-04-24 12:59:16 -04:00
mode.test.ts fix(install): harden web wizard against review findings 2026-04-19 12:43:00 -04:00
mode.ts fix(install): harden web wizard against review findings 2026-04-19 12:43:00 -04:00
root.tsx feat(fabro-web): port /chats/new + /chats/:id from prototype (#289) 2026-05-16 17:10:16 -04:00
router.test.tsx Remove obsolete playground browser route assertion 2026-09-04 10:13:16 -04:00
router.tsx Read Usage in the web app and rename the Billing tab to Usage 2026-09-14 12:40:04 -06:00