feat(visualization): add integrated research workspace - #36
Conversation
Reviewer's GuideImplements the Phase 6.9 Integrated Research Workspace: a new /visualization/workspace route that composes existing GenomeAI visualization components around a shared genomic context using an injectable data-source seam, with fixture-backed loaders, accessibility-focused controls, and targeted tests and docs. Sequence diagram for context change in research workspacesequenceDiagram
actor Researcher
participant ResearchContextSelector
participant ResearchWorkspace
participant GenomeBrowserPanel
participant GeneTranscriptPanel
participant useVisualizationData
participant WorkspaceDataSource
Researcher->>ResearchContextSelector: change select value (brca1-locus)
ResearchContextSelector->>ResearchWorkspace: onSelectContext(context)
ResearchWorkspace->>ResearchWorkspace: setActiveContext(context)
ResearchWorkspace->>ResearchWorkspace: contextRegionKey(activeContext.region)
ResearchWorkspace-->>GenomeBrowserPanel: remount with region
ResearchWorkspace-->>GeneTranscriptPanel: remount with region
GeneTranscriptPanel->>useVisualizationData: loader(signal)
useVisualizationData->>WorkspaceDataSource: loadGenes(region, signal)
WorkspaceDataSource-->>useVisualizationData: genes
useVisualizationData-->>GeneTranscriptPanel: status=success, data
GenomeBrowserPanel->>WorkspaceDataSource: loadGenomeGenes(interval, signal)
GenomeBrowserPanel->>WorkspaceDataSource: loadGenomeVariants(interval, signal)
WorkspaceDataSource-->>GenomeBrowserPanel: gene features
WorkspaceDataSource-->>GenomeBrowserPanel: variant features
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing |
|
Important Review available on request
Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 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. Comment |
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- In
fixtureDataSources,abortAwarepartially duplicates the abort handling already encapsulated byresolveFixture; consider unifying on a single helper (e.g. a genericabortAwarethat can wrap both interval and whole-dataset loaders) to avoid subtle differences in cancellation behavior. - In
ResearchContextSelector, theselecthas both a visible<label>and anaria-labelof "Research context"; you can drop thearia-labeland rely on thelabel’shtmlForassociation to reduce redundant ARIA and keep the accessible name source consistent.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In `fixtureDataSources`, `abortAware` partially duplicates the abort handling already encapsulated by `resolveFixture`; consider unifying on a single helper (e.g. a generic `abortAware` that can wrap both interval and whole-dataset loaders) to avoid subtle differences in cancellation behavior.
- In `ResearchContextSelector`, the `select` has both a visible `<label>` and an `aria-label` of "Research context"; you can drop the `aria-label` and rely on the `label`’s `htmlFor` association to reduce redundant ARIA and keep the accessible name source consistent.
## Individual Comments
### Comment 1
<location path="apps/web/src/components/workspace/ResearchContextSelector.tsx" line_range="61-65" />
<code_context>
+ <label htmlFor="research-context" className="text-sm font-medium text-gray-700">
+ Research context
+ </label>
+ <select
+ id="research-context"
+ aria-label="Research context"
+ data-testid="research-context-select"
+ className="w-full rounded-md border border-gray-300 bg-white px-3 py-2 text-sm text-gray-900"
</code_context>
<issue_to_address>
**suggestion:** Consider relying on the explicit `<label>` instead of duplicating it with `aria-label` on the `<select>`.
Because the `<select>` is already labeled via `htmlFor`/`id`, the extra `aria-label` is redundant and may cause some screen readers to announce the label twice. Please remove the `aria-label` and rely on the associated `<label>` for the accessible name.
```suggestion
<select
id="research-context"
data-testid="research-context-select"
className="w-full rounded-md border border-gray-300 bg-white px-3 py-2 text-sm text-gray-900"
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Summary
Implements Phase 6.9 — Integrated Research Workspace.
This adds a unified research workspace that brings together the existing GenomeAI visualization capabilities into a single UI.
Features
/visualization/workspacearia-liveannouncements and validation alertsData
Tests
Added workspace coverage for:
Documentation
docs/visualization/workspace.mddocs/visualization/README.mddocs/visualization/roadmap.mdConstraints
Verification
Phase
Phase 6.9 — Integrated Research Workspace
Next
Phase 6.11 — Visualization Testing & Documentation
Summary by Sourcery
Implement an integrated research workspace that unifies existing GenomeAI visualization panels into a single route around a shared genomic context, backed by a fixture-based data-source seam and documented as Phase 6.9.
New Features:
/visualization/workspaceroute exposing an integrated research workspace composed of genome, gene/transcript, network, protein, and scientific chart panels.WorkspaceDataSourceinterface and fixture-backed implementation to supply workspace data without backend changes.Enhancements:
Documentation:
Tests: