GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(web): working threads stay in the shelf when the window comes back by thelogicmatrix · Pull Request #30077 · pingdotgg/t3code

Conversation

@thelogicmatrix

@thelogicmatrix thelogicmatrix commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Problem

With the Working shelf on, every working thread leaves the shelf and slides back each time the window returns from the background. Returning resubscribes the shell, which sets it to synchronizing until the completion marker arrives. Since #26195, isSidebarEnvironmentDisconnected counts a connected environment whose shell is not live as disconnected, so the rows move to the list and back on a healthy connection. #26195 describes reconnecting, offline, error, unsupported and available as disconnected, and aims to avoid moving threads out of the shelf and back on a cold start.

Change

Only connection phases past the first attempt count as disconnected. connected and connecting keep their placement, whatever the shell status. Unreachable environments still leave the shelf, as #26195 intended.

Trade-off: if the shell stream keeps failing on a healthy connection, a row stays in the shelf with its last known state.

Scope and approval

A small, focused fix for an obvious bug, with no prior issue. Related to #26195. Separate from #25471, which relabels stale rows and keeps their placement.

Verification

  • Sidebar.logic.test.ts covers each phase. The connected case fails on main and passes here, and all 87 tests in the file pass.
  • Web dev server on main (cefb544) with a running turn, expanded shelf and a different thread open, sampling the row's section every frame over 3 returns: on main the row goes list then shelf each time, and with this change it stays in shelf each time.

Not checked: a really hidden window (I dispatched visibilitychange on a visible page, which takes the same wakeup path), or a slow remote connection. On loopback with one thread the row is out for about 30 ms, so a recording shows no visible slide, and I've included the frame log instead.

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@thelogicmatrix @claude
fix(web): working threads stay in the shelf when the window comes back
af837a1
Returning to the window resubscribes the shell, which marks it synchronizing
until the server's completion marker arrives. The sidebar counted a connected
environment whose shell was not live as disconnected, so every working thread
left the Working shelf and slid back in moments later. Only connection phases
past the first attempt now count as disconnected.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Nov 3, 2026
macroscopeapp[bot]
macroscopeapp Bot approved these changes Nov 3, 2026
View reviewed changes
@macroscopeapp

macroscopeapp Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at af837a1

Macroscope's review found this PR approvable — Working threads now retain their sidebar shelf placement when the window returns, using connection state rather than live-shell hydration. The change is limited to presentation and leaves thread execution, stored data, and settings unchanged.

You can add or adjust custom eligibility rules. Learn more.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coderabbitai

coderabbitai Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Walkthrough

The sidebar now determines whether an environment is disconnected from its connection phase alone. The helper no longer accepts shell liveness, and its tests verify the result for each phase.

Changes: Sidebar disconnection

Layer / File(s) Summary
Apply connection-phase disconnection
apps/web/src/components/Sidebar.logic.ts, apps/web/src/components/Sidebar.tsx, apps/web/src/components/Sidebar.logic.test.ts
The helper returns false for connected and connecting, and true for the other tested phases. The sidebar passes only the environment’s connection state. Tests now use phase-only inputs.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related issues

  • [Bug]: Cached thread rows keep claiming Working while their environment reconnects #25449 — Both changes address sidebar treatment of thread state when connectivity or shell state changes. This PR uses connection phase to determine disconnection.

Possibly related PRs

  • pingdotgg/t3code#29556 — Both changes remove the shell-liveness check from the sidebar disconnection rule.
  • pingdotgg/t3code#26195 — This PR continues the candidate’s connection-phase-based rule for sidebar placement.

Suggested reviewers: saphid, macroscopeapp

Merge Risk: Minimal · up to af837

No actionable merge-blocking risk was identified in the reviewed change.

Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed The title names the fix, the affected area (web), and the symptom: working threads leave the shelf when the window returns. The raw summary shows the change removes the shell-liveness input from isSid…
Description check Passed The description follows the template sections: Problem, Change, Scope and approval, and Verification. The Problem section gives the symptom, the reproduction context (Working shelf on, window returns …
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.
Full details: Title check

Explanation

The title names the fix, the affected area (web), and the symptom: working threads leave the shelf when the window returns. The raw summary shows the change removes the shell-liveness input from isSidebarEnvironmentDisconnected and from Sidebar.tsx, so the title matches the main change. It is specific and descriptive, though it does not name the mechanism.

Full details: Description check

Explanation

The description follows the template sections: Problem, Change, Scope and approval, and Verification. The Problem section gives the symptom, the reproduction context (Working shelf on, window returns from background), and the cause (#26195). The Change section explains the fix and its trade-off. Scope and approval explains why no prior issue exists and calls the change a small, focused fix of an obvious bug. Verification lists a focused unit test result and a manual dev-server comparison, and it states what was not checked. The author did not include the template's HTML comments, which is expected. The description does not include a UI screenshot or recording, but it explains that the timing is too short to show a visible slide and includes a frame log instead. The template asks for before/after screenshots for UI changes, so this gap is worth noting, but it does not make the description largely incomplete.

Finishing Touches
Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.
Recent review info
Run configuration
  • Source mode: Auto
  • Repository: pingdotgg/t3code
  • Branch: main
  • File: .coderabbit.config.ts
  • Commit: cefb544
  • Layers: Repository TS config
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: eb51ba7b-fb54-4c76-8018-c406a8532410
Commits

Reviewing files that changed from the base of the PR and between cefb544 and af837a1.

Files selected for processing: 3
  • apps/web/src/components/Sidebar.logic.test.ts
  • apps/web/src/components/Sidebar.logic.ts
  • apps/web/src/components/Sidebar.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@thelogicmatrix

thelogicmatrix commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

Closing as a duplicate of #29556, which makes the same change and has better evidence.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@thelogicmatrix thelogicmatrix closed this Nov 3, 2026
@coderabbitai coderabbitai Bot mentioned this pull request Nov 3, 2026
fix(web): keep working threads in place when refocusing tabs #29556
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@macroscopeapp macroscopeapp[bot] macroscopeapp[bot] approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@thelogicmatrix
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.