You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e5d537e
Browse filesBrowse the repository at this point in the historyBrowse files
fix(glance): the panel's cards run their taps and chat; threads keep Mail's account
The desktop glance panel drew L0 cards with their chips and buttons but
ran none of their taps: only the card window did (glance_sheet.rs
dispatch_taps), which only a card's toast opens, while every new card
opens the panel. A card's buttons and its in-card chat (sys.chat) did
nothing there.
- glance_card.rs: `LiveCards`, kept by both surfaces. A tile's L0 taps,
taken from its own isolate only, run through its card's L0Session, made
for the app that published the card: the declared transition, the
host's sys.chat write (glance_chat.rs, octosense-l0-chat) and a
re-lowering when a tap or the agent's reply moved the card. take_taps
now takes one isolate's taps and leaves the others' (two surfaces
dispatch), and a swept tile drops its queued taps (a later isolate may
get the same heap key).
- glance_panel.rs: tiles draw their card as its session has it and
dispatch after each event. glance_sheet.rs uses the same path; its
redraw now repaints its own area, so a reply that comes later shows.
- Chat threads: glance_chat.rs keeps a thread in the account folder of
the account the app's agent acts for. contained_account_in read whether
the app keeps accounts from its recorded storage block, recorded only
when the app opens or its agent is prepared; asked earlier (the demo's
seed at startup), it answered `device` for a signed-in Mail. It now
reads the manifest's block when none was recorded yet.
- octosense-l0-chat: a reply is kept in the thread its message went to,
even when the account switched while the agent answered.
- glance_chat.rs: HostResponder's doc no longer says Mail has no agent;
the canned reply under OCTOSENSE_GLANCE_DEMO=mail stays by design.
- desktop README (en, zh-CN): the demo cards work the same in the panel.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: crates/l0-chat/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ Octoscript's L0 checker admits the card. The rest is the host's, and is here
20
20
|**The transcript is the host's**|`seed` puts the host's own transcript under every `sys.chat` source's name, replacing whatever the publisher put in its `data`: no forged `model` entry, no other app's thread. |
21
21
|**Roles**| Entries are `{id, role, text, at}`, `role` one of `user`, `model`, `host`. A card's one write is `append`, recorded as a `user` entry only when its payload is what the person typed (`ValueOrigin::UserInput`). Only the host's `ChatStore::append_reply` writes `model` (the agent's answer, drawn AI-written) or `host` (a notice). A payload that looks like `{"role":"model",…}` is just the text of a `user` entry. |
22
22
|**Limits**|`TEXT_MAX_BYTES` 4 KiB per message after trimming, control characters dropped; one message per thread every `MIN_INTERVAL_MS` (2 s) and none while the agent is still answering; the last `RETENTION` (200) entries kept; a reply cut at `REPLY_MAX_BYTES` (16 KiB); app and thread ids at most `ID_MAX` (64), threads `[A-Za-z0-9_-]`. |
23
-
|**Storage**|`ChatStore::with_folder` keeps one JSON file per (app, thread) in the folder the host names; `ChatStore::in_memory` for tests. The shell names the app's account folder (ADR 0004 §11): `apps/<app>/accounts/<account>/chat/<thread>.json`, owner-only, for the account the app's agent acts for (`device` without one), so switching accounts switches transcripts. AppCard keeps its chats in `apps/appcard/accounts/device/chat/`. |
23
+
|**Storage**|`ChatStore::with_folder` keeps one JSON file per (app, thread) in the folder the host names; `ChatStore::in_memory` for tests. The shell names the app's account folder (ADR 0004 §11): `apps/<app>/accounts/<account>/chat/<thread>.json`, owner-only, for the account the app's agent acts for (`device` without one), so switching accounts switches transcripts; a reply is kept in the thread its message went to, even if the account switched while the agent answered. AppCard keeps its chats in `apps/appcard/accounts/device/chat/`. |
24
24
|**Stale**| Every change bumps `ChatStore::generation` and calls the host's change hook (`set_on_change`), so a surface re-seeds and re-lowers the card when the reply arrives. |
0 commit comments