Fix Hive dashboard: correct "Deeplake" label and scope recall to the selected project#15
Conversation
…selected project - health.tsx: the service connectivity block rendered "Deep Lake" (two words); the product name is "Deeplake". - dashboard.tsx: the recall call dropped `scope.project`, so the POST carried no `x-honeycomb-project` header and honeycomb returned workspace-wide hits regardless of the selected Org > Workspace > Project. Pass `scope.project` (mirroring `wire.kpis`) and add it to the callback dependencies. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
📝 WalkthroughWalkthroughThe recall action in the dashboard page now scopes requests to the selected project by passing scope.project to wire.recall and updating the callback's dependency array. Separately, the Health page's connection status label text was changed from "Deep Lake" to "Deeplake". ChangesDashboard and Health page updates
Estimated code review effort: 1 (Trivial) | ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/dashboard/web/pages/dashboard.tsx (1)
259-274: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winConsider guarding recall against a stale-project race, similar to
hydrateSeqRef.Now that
recallis project-scoped, a slow in-flight recall that resolves after the user switchesscope.projectwill commit results tagged to the previous project while the UI has already moved to a new one — the same racehydrateSeqRef(Line 192) was introduced to prevent forhydrate.recallBusyonly blocks concurrent recalls, not out-of-order commits across a project switch.♻️ Optional: apply a sequence-token guard analogous to `hydrateSeqRef`
+ const recallSeqRef = React.useRef(0); + const recall = React.useCallback(async (): Promise<void> => { const q = query.trim(); if (q === "" || recallBusy) return; setRecallBusy(true); + const seq = ++recallSeqRef.current; // PRD-049e: scope recall to the selected project (mirrors how `hydrate` passes `scope.project` // to `wire.kpis`). Without this the recall POST carries no `x-honeycomb-project` header and // honeycomb returns workspace-wide hits regardless of the selected Org > Workspace > Project. const { memories, degraded } = await wire.recall(q, scope.project); + if (seq !== recallSeqRef.current) { setRecallBusy(false); return; } setResults(memories); setRecalled(true); setRecallDegraded(degraded); setRecallNonce((n) => n + 1); const top = memories.length > 0 ? ` · ${memories[0]?.score.toFixed(2)} top` : ""; pushNote(`recall "${q}" → ${memories.length} hits${top}`); setRecallBusy(false); }, [query, recallBusy, wire, pushNote, scope.project]);🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/dashboard/web/pages/dashboard.tsx` around lines 259 - 274, Guard the dashboard `recall` flow against stale-project commits by adding a sequence/token check similar to `hydrateSeqRef`. In `dashboard.tsx`, update the `recall` callback so an in-flight `wire.recall(q, scope.project)` only applies `setResults`, `setRecalled`, `setRecallDegraded`, `setRecallNonce`, and `pushNote` if the active project still matches the one used for the request. Use a ref-based request/version guard around `recall` (mirroring the `hydrate` protection) so switching `scope.project` cannot let an older recall overwrite the UI.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/dashboard/web/pages/dashboard.tsx`:
- Around line 259-274: Guard the dashboard `recall` flow against stale-project
commits by adding a sequence/token check similar to `hydrateSeqRef`. In
`dashboard.tsx`, update the `recall` callback so an in-flight `wire.recall(q,
scope.project)` only applies `setResults`, `setRecalled`, `setRecallDegraded`,
`setRecallNonce`, and `pushNote` if the active project still matches the one
used for the request. Use a ref-based request/version guard around `recall`
(mirroring the `hydrate` protection) so switching `scope.project` cannot let an
older recall overwrite the UI.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 249414db-7666-4b38-96fe-5c8578551623
📒 Files selected for processing (2)
src/dashboard/web/pages/dashboard.tsxsrc/dashboard/web/pages/health.tsx
Why
Two dashboard defects: the per-service connectivity block rendered "Deep Lake" (the product name is "Deeplake"), and the dashboard recall dropped the selected project — the POST carried no
x-honeycomb-projectheader, so honeycomb returned workspace-wide hits regardless of the chosen Org > Workspace > Project (the KPI band re-scoped, the recall results below it did not).What
health.tsx: "Deep Lake" → "Deeplake".dashboard.tsx: passscope.projectintowire.recall(mirroringwire.kpis) and add it to the callback deps.Tests
tsc --noEmitclean; full vitest suite 555 tests green.🤖 Generated with Claude Code
Summary by CodeRabbit