Skip to content

fix(app): avoid suspending on pending child path#30314

Merged
Hona merged 1 commit into
anomalyco:devfrom
Hona:fix/session-list-path-loading-e2e
Jun 2, 2026
Merged

fix(app): avoid suspending on pending child path#30314
Hona merged 1 commit into
anomalyco:devfrom
Hona:fix/session-list-path-loading-e2e

Conversation

@Hona
Copy link
Copy Markdown
Member

@Hona Hona commented Jun 2, 2026

Issue for this PR

Follow-up to #30167 and #30220.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Avoid reading Solid Query's suspending data resource while a child path query is pending. This preserves the requested-directory fallback so the home session list can render before /path resolves.

The unit mock now throws if pending path data is read, covering the regression introduced when child directory queries moved from useQueries() to useQuery().

How did you verify your code works?

  • Reproduced e2e/regression/session-list-path-loading.spec.ts failing on current dev
  • Ran bunx playwright test --project=chromium --workers=1 from packages/app: 5 passed
  • Ran bun run test:unit from packages/app: 339 passed
  • Ran bun typecheck from packages/app
  • Push hook repository typecheck passed

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@Hona Hona requested a review from adamdotdevin as a code owner June 2, 2026 03:06
Copilot AI review requested due to automatic review settings June 2, 2026 03:06
@Hona Hona enabled auto-merge (squash) June 2, 2026 03:07
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a regression in the app’s global sync child store by preventing Solid Query’s suspending data resource from being accessed while the child path query is still loading, preserving the “requested directory” fallback so the session list can render before /path resolves.

Changes:

  • Update child-store path getter to return a fallback value while pathQuery.isLoading is true (avoids reading suspending data).
  • Strengthen the unit test mock to throw if pending path query data is read, ensuring the regression is covered.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/app/src/context/global-sync/child-store.ts Guards pathQuery.data access behind pathQuery.isLoading to avoid suspense and preserve requested-directory fallback.
packages/app/src/context/global-sync/child-store.test.ts Updates Solid Query mock to throw on pending path data reads, enforcing the intended behavior in tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Hona Hona merged commit ab69f41 into anomalyco:dev Jun 2, 2026
13 of 14 checks passed
ShamirSecret pushed a commit to ShamirSecret/auto-code-machine that referenced this pull request Jun 2, 2026
0xLLLLH pushed a commit to 0xLLLLH/opencode that referenced this pull request Jun 2, 2026
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.

2 participants