This repository was archived by the owner on Jul 16, 2026. It is now read-only.
Repository navigation
feat(dashboard): add outbox card to surface bridge audit log (Phase 5.15) - #83
Merged
Merged
Conversation
….15)
`src/outbox_log.py` is the audit log every bridge appends to after a
successful outbound delivery. Stando has had the module + tests for
some time, and `slack-bridge.py` already records to it on every reply
(line 575) — but the data was invisible. Dashboard had no reader and
no rendering card, so the writes accumulated as a JSONL file no one
read. OSS sutando ships both pieces; this PR ports the missing half.
Changes:
- `src/dashboard.py`:
- Add `get_outbox(limit: int = 10) -> list[dict]` reader. Imports
`outbox_log` lazily so its failure cannot break dashboard rendering
(telemetry is a courtesy, never load-bearing); returns `[]` on any
exception.
- Add the Outbox card to the render flow between Capabilities Matrix
and Keyboard Shortcuts. Hidden when empty via `if outbox:` — fresh
installs and bridges that haven't recorded anything yet shouldn't
see a stub card. Renders channel-typed emojis (slack/discord/
telegram/imessage/whatsapp/email/x), truncated timestamps,
recipient labels, and 80-char body previews — identical shape to
OSS sutando.
- `tests/dashboard-outbox.test.py` (new, 6 tests):
- Happy path: append entries via outbox_log, read back via get_outbox.
- Limit param honored + default (10) applied.
- Fresh-install (no file) returns [] not exception.
- Fault tolerance: stub outbox_log.read_recent to raise → get_outbox
returns [] without propagating the exception.
- Structural source guard: `if outbox:` gate on the render block.
- get_outbox is a module-level callable (not a closure / hidden symbol).
Audit context:
- Inventory of remaining src/ Python files identified `dashboard.py`
as a 117-line divergence with one OSS-only def: `get_outbox`. Other
diff lines are deliberate stando-specific path-resolution (state_paths
vs workspace_default, personal_path signature, DASHBOARD_PORT env
override) — those were NOT touched per the minimal-divergence rule.
- Writers beyond slack-bridge (discord-bridge had ~4 outbox_log.append
sites in OSS) are deferred — they'd be much larger ports and require
audit of which call sites are still relevant in stando's flow.
Verification:
- `python3 tests/dashboard-outbox.test.py` → 6/6 pass.
- Full Python regression sweep → 57/57 pass (was 56; +1 net-new file).
- TypeScript typecheck clean.
- Smoke test of the live reader pulled 5 prior entries from the
existing outbox file — confirms the wiring is correct.
Phase 5.15 of the OSS → private sync.
Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced Jun 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/outbox_log.pyis the audit log every bridge appends to after a successful outbound delivery. Stando has had the module + tests for some time, andslack-bridge.pyalready records to it on every reply (line 575) — but the data was invisible. Dashboard had no reader and no rendering card, so the writes accumulated as a JSONL file no one read. OSS sutando ships both pieces; this PR ports the missing half.Changes
src/dashboard.pyget_outbox(limit: int = 10) -> list[dict]reader. Importsoutbox_loglazily so its failure cannot break dashboard rendering (telemetry is a courtesy, never load-bearing); returns[]on any exception.if outbox:— fresh installs and bridges that haven't recorded anything yet shouldn't see a stub card. Renders channel-typed emojis (slack/discord/telegram/imessage/whatsapp/email/x), truncated timestamps, recipient labels, and 80-char body previews — identical shape to OSS sutando.tests/dashboard-outbox.test.py(new, 6 tests)outbox_log, read back viaget_outbox.[], not exception.outbox_log.read_recentto raise →get_outboxreturns[]without propagating.if outbox:gate on the render block (prevents future PR from accidentally showing a stub card).get_outboxis a module-level callable (catches accidental scope-hiding refactors).Audit context
src/Python files identifieddashboard.pyas a 117-line divergence with one OSS-only def:get_outbox.state_pathsvsworkspace_default,personal_pathsignature,DASHBOARD_PORTenv override) — those were NOT touched per the minimal-divergence rule.outbox_log.appendsites) are deferred — those would be much larger ports and require auditing which call sites are still relevant in stando's flow. Queued as Phase 5.16 candidate if the user wants outbox coverage for discord too.Test plan
python3 tests/dashboard-outbox.test.py→ 6/6 passpnpm -s typecheck→ cleanpython3 -m py_compile src/dashboard.py→ cleanFollowup queue
outbox_log.append(...)write sites indiscord-bridge.py(~4 sites in OSS) so discord deliveries also show up in the dashboard card.Made with Cursor