Skip to content

🐛 Inbox: render the empty state instead of "Loading inbox…" forever - #17920

Merged
hivecommons-hive[bot] merged 3 commits into
v5from
inbox-empty-state
Nov 12, 2026
Merged

hivecommons-hive[bot] merged 3 commits into
v5from
inbox-empty-state

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Fixes #17918. Follow-up to #17885 (tracker #17875).

Why

On a hive with no knowledge.connectors entry, bootInbox never ran (it sat behind the connector-syncer early return), GET /api/inbox answered 404, and the SPA loader's if (!r.ok) return; left the "Loading inbox…" placeholder up forever — seen on oke-11-r05x running candidate f57a834.

What

  • cmd/hive: the Inbox service always boots; zero sources is a valid, empty inbox.
  • GET /api/inbox returns 200 with items: [] 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.
  • Docs: inbox-voice-sources.md API note. Changelog fragment.

Tests

  • TestInboxEndpoints: no service → 200 {items:[]}, settings still 404.
  • TestBootInboxWithoutConnectors (cmd/hive).
  • TestInboxLoaderHandlesNonOKAndEmpty static test on the SPA loader.

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>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 12, 2026
@clubanderson

Copy link
Copy Markdown
Member Author

/approve

@kubestellar-prow kubestellar-prow Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 12, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 12, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:94 now calls b.bootInbox(...) before newKnowledgeConnectorSyncer and before b.knowledgeConnectors = s at :100.
  • bootInbox builds its sources via inboxSource (boot_inbox.go:32), and inboxSource short-circuits to the vault-backed FactSource whenever b.knowledgeConnectors == nil (boot_inbox.go:67). On v5 that field was set by the time bootInbox ran (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, and Available/readiness for the live reader is lost. TestBootInboxWithoutConnectors can'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

@hivecommons-hive

hivecommons-hive Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.

@clubanderson this PR is held at stage/071-needs-author and the hive will not merge it yet.

Why:

  • the review swarm requested changes

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`.

@hivecommons-hive
hivecommons-hive Bot merged commit 4e3bbc9 into v5 Nov 12, 2026
82 of 83 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the inbox-empty-state branch November 12, 2026 15:41
@hivecommons-hive

Copy link
Copy Markdown
Contributor

merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at 59697ad.

hivecommons-hive Bot added a commit that referenced this pull request Nov 13, 2026
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 Inbox shows "Loading inbox…" forever on a hive with no voice connector

1 participant