Skip to content

fix(visualization): address workspace review feedback - #37

Merged
dsk-dev-ai merged 1 commit into
mainfrom
feat/workspace-review-fixes
Aug 17, 2026
Merged

fix(visualization): address workspace review feedback#37
dsk-dev-ai merged 1 commit into
mainfrom
feat/workspace-review-fixes

Conversation

@dsk-dev-ai

@dsk-dev-ai dsk-dev-ai commented Aug 17, 2026

Copy link
Copy Markdown
Owner

Applies Sourcery review feedback from the Phase 6.9 workspace PR:

  • ResearchContextSelector: drop the redundant aria-label on the context <select> (the <label htmlFor> association already provides the accessible name, avoiding double announcements).
  • fixtureDataSources: unify abort handling behind a single shared abortAware helper in lib/workspace/dataSources.ts (used by both interval and whole-dataset loaders via resolveFixture), removing the duplicated local wrapper.
  • Add focused abortAware tests (run resolver when not aborted; reject with AbortError without running the resolver when already aborted).

Validation: lint, typecheck, 725 vitest + 1606 pytest, turbo build, git diff --check all green.

Summary by Sourcery

Unify abort-aware handling for workspace fixture data sources and tighten workspace UI accessibility.

Enhancements:

  • Introduce a shared abortAware helper in workspace dataSources and use it for both constant fixture loaders and interval-based loaders to centralize AbortSignal handling.
  • Simplify ResearchContextSelector markup by relying on the existing label association instead of a redundant aria-label on the select element.

Tests:

  • Add focused unit tests for abortAware to verify it runs the resolver when not aborted and rejects with an AbortError without invoking the resolver when already aborted.

@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing

@sourcery-ai

sourcery-ai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Reviewer's Guide

Centralizes abort handling for workspace fixture data sources via a shared abortAware helper (with focused tests) and removes a redundant aria-label from the research context selector for better a11y.

Sequence diagram for centralized abortAware loader behavior

sequenceDiagram
  participant Caller
  participant abortAware
  participant Resolver

  Caller->>abortAware: abortAware(resolver)
  abortAware-->>Caller: WorkspaceLoader

  Caller->>abortAware: WorkspaceLoader(signal)
  alt [signal.aborted]
    abortAware-->>Caller: Promise.reject(AbortError)
  else [not aborted]
    abortAware->>Resolver: resolver(signal)
    Resolver-->>abortAware: Promise<T>
    abortAware-->>Caller: Promise<T>
  end
Loading

File-Level Changes

Change Details Files
Introduce a shared abortAware helper for workspace loaders and use it to implement resolveFixture and demo fixture data sources.
  • Add abortAware helper that short-circuits aborted signals with an AbortError before invoking the resolver.
  • Refactor resolveFixture to delegate to abortAware while preserving the fixture-based loader behavior.
  • Replace the local abortAware implementation in fixtureDataSources with imports of the shared abortAware and resolveFixture from the workspace dataSources module.
apps/web/src/lib/workspace/dataSources.ts
apps/web/src/components/workspace/fixtureDataSources.ts
Add focused tests for abortAware behavior and keep resolveFixture tests for fixture resolution.
  • Import abortAware and vi from vitest in the workspace dataSources test file.
  • Add tests to verify abortAware calls the resolver when the signal is not aborted and rejects with AbortError without calling the resolver when already aborted.
apps/web/src/lib/workspace/dataSources.test.ts
Simplify research context selector accessibility by relying on the explicit label association.
  • Remove the redundant aria-label from the research context element so the label htmlFor provides the accessible name.
apps/web/src/components/workspace/ResearchContextSelector.tsx

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Important

Review available on request

  • 🔍 Trigger review

Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment @coderabbitai review to review the latest changes. For a full review, comment @coderabbitai full review.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 37a30d8e-1325-4e8a-b902-5946d10763ff


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.

@dsk-dev-ai
dsk-dev-ai merged commit ca0bb11 into main Aug 17, 2026
5 checks passed

@sourcery-ai sourcery-ai 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.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

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