Skip to content

Fix Hive dashboard: correct "Deeplake" label and scope recall to the selected project#15

Merged
thenotoriousllama merged 1 commit into
mainfrom
fix/fleet-connectivity-live-reload
Jul 5, 2026
Merged

Fix Hive dashboard: correct "Deeplake" label and scope recall to the selected project#15
thenotoriousllama merged 1 commit into
mainfrom
fix/fleet-connectivity-live-reload

Conversation

@thenotoriousllama

@thenotoriousllama thenotoriousllama commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

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-project header, 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: pass scope.project into wire.recall (mirroring wire.kpis) and add it to the callback deps.

Tests

tsc --noEmit clean; full vitest suite 555 tests green.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Search/recall results on the Dashboard now stay within the selected project, reducing unexpected cross-project matches.
    • The Health page now shows the updated “Deeplake” label for service status, matching the current naming.

…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>
@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The 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".

Changes

Dashboard and Health page updates

Layer / File(s) Summary
Project-scoped recall
src/dashboard/web/pages/dashboard.tsx
The recall callback passes scope.project into wire.recall(q, scope.project) and adds scope.project to its dependency list.
Health label fix
src/dashboard/web/pages/health.tsx
The Deep Lake connection heading text is changed to "Deeplake".

Estimated code review effort: 1 (Trivial) | ~3 minutes

Poem

A hop, a scope, a project tied,
Recall now knows where to abide.
One label fixed, "Deeplake" so neat,
Two tiny hops, this rabbit's feat! 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the two main changes: the Deeplake label fix and project-scoped recall on the dashboard.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/fleet-connectivity-live-reload

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/dashboard/web/pages/dashboard.tsx (1)

259-274: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Consider guarding recall against a stale-project race, similar to hydrateSeqRef.

Now that recall is project-scoped, a slow in-flight recall that resolves after the user switches scope.project will commit results tagged to the previous project while the UI has already moved to a new one — the same race hydrateSeqRef (Line 192) was introduced to prevent for hydrate. recallBusy only 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

📥 Commits

Reviewing files that changed from the base of the PR and between 09e846c and 3435e8e.

📒 Files selected for processing (2)
  • src/dashboard/web/pages/dashboard.tsx
  • src/dashboard/web/pages/health.tsx

@thenotoriousllama thenotoriousllama merged commit 5a82d38 into main Jul 5, 2026
4 checks passed
@thenotoriousllama thenotoriousllama deleted the fix/fleet-connectivity-live-reload branch July 5, 2026 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant