Skip to content

Fix subject table not loading by updating useInstrumentVisualizaiton useEffect#1332

Open
david-roper wants to merge 1 commit intoDouglasNeuroInformatics:mainfrom
david-roper:load-subject-table
Open

Fix subject table not loading by updating useInstrumentVisualizaiton useEffect#1332
david-roper wants to merge 1 commit intoDouglasNeuroInformatics:mainfrom
david-roper:load-subject-table

Conversation

@david-roper
Copy link
Copy Markdown
Collaborator

@david-roper david-roper commented Apr 7, 2026

Closes issue #1330

Use antgravity gemini 3.1 to scan for why issue occurred.

Adjusted useEffect return statement to allow session info to properly load on first initialization.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed a data synchronization issue to ensure the visualization properly updates when session and username information becomes available.

@david-roper david-roper requested a review from joshunrau as a code owner April 7, 2026 21:14
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 7, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 721eb1fb-7a25-46cb-8e98-b0c8c0a12c70

📥 Commits

Reviewing files that changed from the base of the PR and between f64d645 and f83a1c6.

📒 Files selected for processing (1)
  • apps/web/src/hooks/useInstrumentVisualization.ts

Walkthrough

The useInstrumentVisualization hook's effect now includes sessionsUsernameQuery.data in its dependency array, triggering re-execution when session/username lookup results become available rather than only when record data changes.

Changes

Cohort / File(s) Summary
Dependency Array Update
apps/web/src/hooks/useInstrumentVisualization.ts
Added sessionsUsernameQuery.data to the useEffect dependency array to ensure the records-building effect re-runs when session/username data updates.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • Subject table download #1210 — Modifies the same file's record-building and export logic, potentially interdependent with this dependency array fix.

Suggested reviewers

  • joshunrau
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: fixing subject table loading by updating the useEffect dependency array in useInstrumentVisualization hook.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

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