Repository navigation
🐛 dashboard: render the Inbox once the viewer's role is known - #18442
Conversation
The Inbox rendered before /api/role resolved, treating an unknown role as read, and nothing re-rendered until the next 60 s refresh. Hold a loading state until the role is known, notify role listeners when it resolves, and retry the role lookup with backoff before falling back to read-only. Signed-off-by: Andy Anderson <andy@clubanderson.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. clubanderson this PR is held at Failing checks:
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 `#184426522932` sha256:09fdbea525ea15abd9980b1396c07cd969fa5c8d6db1e0656ff1ec944538aae9 — download from the dashboard or `hivectl review evidence #18442`. |
Signed-off-by: Andy Anderson <andy@clubanderson.com>
Signed-off-by: Andy Anderson <andy@clubanderson.com>
…never delay it Signed-off-by: Andy Anderson <andy@clubanderson.com>
Signed-off-by: Andy Anderson <andy@clubanderson.com>
|
merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at 1acffb6. |
…ut, and read cleanly (#18527) * 🐛 dashboard: Meetings and Calendar wait for the role, sit in the layout, and read cleanly - Meetings and Calendar rendered their not-allowed notice before /api/role resolved and never re-rendered; they now show a loading state and subscribe to the role listeners gh-auth.js notifies (same contract as the Inbox fix, #18442). A network failure says the hive is unreachable instead of leaving "Loading meetings…". - Both sections were missing from DASHBOARD_LAYOUT_TEMPLATE. The generated page parses every section outside #hive-dashboard-root and layout.js moves only template sections back, so these two stayed outside the root where --dash-card-padding is undefined: their cards had zero padding. Add them after the Inbox, matching the sidebar order. - Meetings form: link and title fields, then the Voice toggle beside its checkbox and the primary button; Discord disclosure aligned with the form. Meeting rows: title, kc-pill state, platform and time, a plain-language error with the raw error under details. Empty states use empty-dashed. Calendar sub-sections get spacing. Existing tokens and classes only. Signed-off-by: Andy Anderson <andy@clubanderson.com> * 🐛 dashboard: collapse Calendar and Meetings by default like the Inbox; 24 layout sections Now that both are layout sections, the collapse-defaults classification requires every non-critical section in DASHBOARD_DEFAULT_COLLAPSED_SECTIONS (only for new browsers; existing ones keep their state, and the sidebar expands the section it opens). The stale-layout normalize test counts 24 sections. Signed-off-by: Andy Anderson <andy@clubanderson.com> --------- Signed-off-by: Andy Anderson <andy@clubanderson.com>
Root cause
checkGHAuthfetches/api/rolein parallel with/api/inbox.renderInboxgated onwindow._hiveRolewithout checking whether the role had resolved, so an unknown role behaved asread: Share → Hive actions, ▶ Play and the bulk Hive menu were hidden until the next 60 s Inbox refresh re-rendered. Knowledge already repaints fromshowGHAuthState, and Sessions awaits its own role fetch, so Inbox was the only section with the bug.Fix
hiveAuthResolvednow notifieswindow._hiveRoleListenersthe first time the role resolves and whenever it changes; the Inbox subscribes and re-renders.renderInboxshows the loading state until the role is known (or the lookup gave up), so read-only users never see write actions and owners never lose them./api/roleis retried (3 attempts, 0.5 s then 1 s backoff) on network errors and 5xx; if it stays failed the viewer is read-only and the Inbox says so.Tests
New
dashboard/test/inbox-role-race.test.js: render before role then owner shows the actions, read keeps them hidden, failed fetch falls back to read-only, retry recovers.🤖 Generated with Claude Code