Skip to content

Fix GUI smoke-test regressions - #268

Merged
TraderSamwise merged 4 commits into
masterfrom
chore/gui-smoke-next-12
Jun 29, 2026
Merged

Fix GUI smoke-test regressions#268
TraderSamwise merged 4 commits into
masterfrom
chore/gui-smoke-next-12

Conversation

@TraderSamwise

@TraderSamwise TraderSamwise commented Jun 29, 2026

Copy link
Copy Markdown
Owner

Summary

  • explain blocked/offline agent resume states in the GUI instead of showing a dead resume action
  • stop offline agent chat pages from opening session-scoped event streams or teammate polling loops
  • show project-loading states for routed project screens while daemon project snapshots hydrate

Verification

  • PATH="$HOME/.nvm/versions/node/v24.16.0/bin:$PATH" yarn --cwd app typecheck
  • PATH="$HOME/.nvm/versions/node/v24.16.0/bin:$PATH" yarn --cwd app lint (passes with existing 4 warnings)
  • PATH="$HOME/.nvm/versions/node/v24.16.0/bin:$PATH" yarn --cwd app vitest run
  • PATH="$HOME/.nvm/versions/node/v24.16.0/bin:$PATH" yarn build:ui:local
  • git push pre-push gate: yarn typecheck && yarn lint && yarn test
  • Chrome DevTools smoke: mobile/desktop project routes, global inbox/thread routing, service detail/not-found, offline agent network timing

Summary by CodeRabbit

  • New Features

    • Added consistent “Loading project…” UI across multiple project-dependent screens, with headers and page states reflecting the in-progress fetch.
    • Improved session resume UX by showing a disabled “Resume unavailable…” indicator when resuming is blocked, including a banner in agent chat.
  • Bug Fixes

    • Prevented “no project selected” (or partially rendered content) from appearing before project data is ready.
    • Refined offline/exited session handling for heartbeat behavior and teammate controls.

@vercel

vercel Bot commented Jun 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app Ready Ready Preview, Comment Jun 29, 2026 2:40am

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 13eada3b-748d-4d41-84ab-dd63d06f0635

📥 Commits

Reviewing files that changed from the base of the PR and between 757818f and cca9118.

📒 Files selected for processing (3)
  • app/app/(main)/(tabs)/(inbox)/notifications/index.tsx
  • app/app/(main)/(tabs)/project/index.tsx
  • app/components/screens/AgentChatScreen.tsx
🚧 Files skipped from review as they are similar to previous changes (3)
  • app/app/(main)/(tabs)/(inbox)/notifications/index.tsx
  • app/app/(main)/(tabs)/project/index.tsx
  • app/components/screens/AgentChatScreen.tsx

📝 Walkthrough

Walkthrough

useRouteProject now exposes projectLoading, and the tab screens render loading headers and cards before empty states. Separately, blocked session resume now shows disabled resume UI and banners, while heartbeat stops for offline or exited sessions.

Changes

Project Loading State

Layer / File(s) Summary
useRouteProject: projectLoading field
app/lib/use-route-project.ts
Adds lastSyncAtAtom, computes projectLoading, and returns it from useRouteProject.
Tab screens: loading header and body state
app/app/(main)/(tabs)/*, app/app/(main)/(tabs)/(dashboard)/graveyard.tsx, app/app/(main)/(tabs)/(inbox)/notifications/index.tsx
Tab screens consume projectLoading and show loading subtitles/cards before the existing no-project branches.

Blocked Resume UI

Layer / File(s) Summary
AgentChatScreen: blocked resume handling
app/components/screens/AgentChatScreen.tsx
Gates heartbeat on session status, derives blocked-resume state, hides teammate management when unavailable, and renders a resume-unavailable banner.
AgentActions: disabled resume button
app/components/agent-actions.tsx
Derives blocked-resume state and renders a disabled resume action when resume is blocked.

Sequence Diagram(s)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • TraderSamwise/aimux#35: Touches app/app/(main)/(tabs)/(dashboard)/graveyard.tsx, the same screen updated here with loading-state branching.
  • TraderSamwise/aimux#264: Changes the same route-project plumbing across the tab screens and use-route-project.ts.

Poem

🐇 I hop where loading shadows glow,
and wait for projects as they flow.
When resumes are blocked, I grin and say,
“Not today, but maybe another day!”
Tabs now hum with patient light,
and chat stays snug through rabbit night.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the PR’s main goal of fixing GUI smoke-test regressions.
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 chore/gui-smoke-next-12

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

app/app/(main)/(tabs)/(inbox)/notifications/index.tsx

ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.

app/app/(main)/(tabs)/project/index.tsx

ESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox.

app/components/screens/AgentChatScreen.tsx

ESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox.


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

@TraderSamwise

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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

Actionable comments posted: 3

🤖 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.

Inline comments:
In `@app/app/`(main)/(tabs)/(inbox)/notifications/index.tsx:
- Around line 474-481: The loading branch in the notifications screen is
inconsistent because the PageHeader subtitle still shows the “Select a project…”
fallback while projectLoading is true. Update the header subtitle logic in
notifications/index.tsx so it also checks projectLoading and displays a
loading-specific subtitle during hydrate, matching the Card state and avoiding
conflicting UI; use the existing PageHeader and projectLoading conditions to
locate the change.

In `@app/app/`(main)/(tabs)/project/index.tsx:
- Around line 384-386: The loading state in the project page still renders the
summary tiles and section chips while `projectLoading` is true, which exposes
empty default metrics beside the loading message. Update the `project` view in
`index.tsx` so the chrome above the body is also gated by `!projectLoading`,
keeping the summary/section blocks hidden until hydration completes and only
rendering them once the project data is ready.

In `@app/components/screens/AgentChatScreen.tsx`:
- Around line 263-266: The resume banner logic in AgentChatScreen is too broad
because it shows blocked resume text whenever session.restoreState is "blocked",
even if the session is already active. Update the restoreBlockedReason condition
so it only returns a blocked reason when the session is both blocked and
actually offline/exited, matching the gating used by AgentActions and any
related resume banner rendering around the same logic.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 486f7a15-11bf-4af7-b347-7e87db3a672b

📥 Commits

Reviewing files that changed from the base of the PR and between 6c698bc and 757818f.

📒 Files selected for processing (10)
  • app/app/(main)/(tabs)/(dashboard)/graveyard.tsx
  • app/app/(main)/(tabs)/(inbox)/notifications/index.tsx
  • app/app/(main)/(tabs)/(threads)/threads.tsx
  • app/app/(main)/(tabs)/coordination/index.tsx
  • app/app/(main)/(tabs)/library/index.tsx
  • app/app/(main)/(tabs)/project/index.tsx
  • app/app/(main)/(tabs)/topology/index.tsx
  • app/components/agent-actions.tsx
  • app/components/screens/AgentChatScreen.tsx
  • app/lib/use-route-project.ts

Comment thread app/app/(main)/(tabs)/(inbox)/notifications/index.tsx
Comment thread app/app/(main)/(tabs)/project/index.tsx
Comment thread app/components/screens/AgentChatScreen.tsx
@TraderSamwise
TraderSamwise merged commit 17293eb into master Jun 29, 2026
3 checks passed
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