Repository navigation
🐛 Inbox: render the empty state instead of "Loading inbox…" forever - #17920
Conversation
With no voice knowledge connector configured bootInbox never ran, so GET /api/inbox answered 404 and the loader returned early, leaving the placeholder up. The Inbox service now always boots (zero sources is a valid, empty inbox), the list endpoint returns 200 with an empty list even without a service, and a non-OK response renders a visible error. Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: clubanderson The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
The empty-state fix itself is right — handleInboxList now answers 200 with items: [] and fetchInbox renders instead of bailing (verified api_inbox.go:63-74, inbox.js:29-35, mirrored in static/index.html). But the way bootInbox is always-run introduces a regression on hives that do have a Plaud connector.
Finding (medium): the direct Plaud reader is never wired any more
src/cmd/hive/boot_knowledge_connectors.go:94now callsb.bootInbox(...)beforenewKnowledgeConnectorSyncerand beforeb.knowledgeConnectors = sat:100.bootInboxbuilds its sources viainboxSource(boot_inbox.go:32), andinboxSourceshort-circuits to the vault-backedFactSourcewheneverb.knowledgeConnectors == nil(boot_inbox.go:67). On v5 that field was set by the timebootInboxran (it was the last line of the function); after this PR it is always nil at that point.- Consequence:
inbox.PlaudSource(src/pkg/inbox/plaudsource.go:17-24, "reads recordings straight from the Plaud connector") is dead code at runtime. Plaud items only appear once a sync has written facts to the vault, andAvailable/readiness for the live reader is lost.TestBootInboxWithoutConnectorscan't see this because it has no connectors.
Suggested shape (keeps the #17918 fix, restores the ordering): leave bootInbox where it was and make it run on every return path, e.g. defer b.bootInbox(knowledge.BaseDir()) as the first statement of bootKnowledgeConnectors, or call it explicitly in the two early-return branches. Either way the service exists with zero connectors and b.knowledgeConnectors is populated when sources are built. A test that configures one Plaud connector and asserts the service's source is a *inbox.PlaudSource would pin it.
Minor, not blocking: the inbox_loader_static_test.go assertions on data.error match code already present on v5 (inbox.js:114), so that part of the test passes without this change.
Everything else (docs note, changelog fragment, TestInboxEndpoints no-service → 200) reads correctly to me. I have not changed anything on the PR.
— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. @clubanderson this PR is held at Why:
Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path. Evidence bundle `#1792059697ad` sha256:bcdf36461518279593e841a601813933353b9a2161f88ea59cc1d3b06e5fb547 — download from the dashboard or `hivectl review evidence #17920`. |
|
merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at 59697ad. |
…17920) * 🐛 Inbox: render the empty state instead of "Loading inbox…" forever With no voice knowledge connector configured bootInbox never ran, so GET /api/inbox answered 404 and the loader returned early, leaving the placeholder up. The Inbox service now always boots (zero sources is a valid, empty inbox), the list endpoint returns 200 with an empty list even without a service, and a non-OK response renders a visible error. Signed-off-by: Andrew Anderson <andy@clubanderson.com> * 🌱 Inbox: reference #17918 in comments Signed-off-by: Andrew Anderson <andy@clubanderson.com> --------- Signed-off-by: Andrew Anderson <andy@clubanderson.com> Co-authored-by: hivecommons-hive[bot] <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Fixes #17918. Follow-up to #17885 (tracker #17875).
Why
On a hive with no
knowledge.connectorsentry,bootInboxnever ran (it sat behind the connector-syncer early return),GET /api/inboxanswered 404, and the SPA loader'sif (!r.ok) return;left the "Loading inbox…" placeholder up forever — seen onoke-11-r05xrunning candidate f57a834.What
cmd/hive: the Inbox service always boots; zero sources is a valid, empty inbox.GET /api/inboxreturns200withitems: []even when no service is wired (mutations still 404).inbox.js: a non-OK response renders a visible error state instead of returning early; empty-state copy notes a new connector starts on the next restart.inbox-voice-sources.mdAPI note. Changelog fragment.Tests
TestInboxEndpoints: no service → 200{items:[]}, settings still 404.TestBootInboxWithoutConnectors(cmd/hive).TestInboxLoaderHandlesNonOKAndEmptystatic test on the SPA loader.