Skip to content

fix(web): unreachable environments no longer keep Automations and Notes loading - #17

Merged
donnes merged 1 commit into
mainfrom
t3code/unreachable-env-loading
Sep 26, 2026
Merged

donnes merged 1 commit into
mainfrom
t3code/unreachable-env-loading

Conversation

@donnes

@donnes donnes commented Sep 26, 2026 •

Copy link
Copy Markdown
Collaborator

Automations (and Notes, on web and mobile) showed "Loading…" forever whenever one known environment was unreachable. The merged list waited for every environment to answer, and a subscription to an offline environment never answers or fails.

The merged lists now only wait on environments that are connected or on their first connection attempt, using a shared isAnswerExpected helper in client-runtime. Offline and failing environments no longer block the list, and their items still appear if they reconnect.

Done by Claude Opus 5.5 in Claude Code.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Notes and automations now finish loading when an environment is not expected to respond, rather than remaining pending.
    • Failed environments continue not to block results, while connected or connecting environments can still keep results pending until they respond. This makes loading states better reflect which environments are available to provide an answer, across both mobile and web.

…es loading

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S labels Sep 26, 2026
@github-actions

Copy link
Copy Markdown

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.5 KiB 13.5 KiB −56 B (−0.4%) 15.1 KiB ✅
Codex Thread snapshot wire 7.1 KiB 7.1 KiB −5 B (−0.1%) 7.3 KiB ✅
Codex Live turn WebSocket wire 6.5 KiB 6.4 KiB −51 B (−0.8%) 7.8 KiB ✅
Codex Live turn WebSocket decoded 56.3 KiB 56.2 KiB −44 B (−0.1%) 66.4 KiB ✅
Codex Live turn messages 10 9 −1 (−10.0%) 21 ✅
Claude Total thread wire 13.5 KiB 13.5 KiB −29 B (−0.2%) 15.1 KiB ✅
Claude Thread snapshot wire 7.1 KiB 7.1 KiB −12 B (−0.2%) 7.3 KiB ✅
Claude Live turn WebSocket wire 6.5 KiB 6.5 KiB −17 B (−0.3%) 7.8 KiB ✅
Claude Live turn WebSocket decoded 57.1 KiB 57.0 KiB −44 B (−0.1%) 66.4 KiB ✅
Claude Live turn messages 10 9 −1 (−10.0%) 21 ✅

Baseline: 1701041 · PR result: 0691bcd · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 114.0 KiB
  • Claude decoded thread snapshot: 114.7 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@coderabbitai

coderabbitai Bot commented Sep 26, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: codemode-studio/t3code/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 4faf3bc0-096b-4310-a333-3633f7d61167

📥 Commits

Reviewing files that changed from the base of the PR and between 1701041 and 0691bcd.

📒 Files selected for processing (4)
  • apps/mobile/src/state/notes.ts
  • apps/web/src/state/automations.ts
  • apps/web/src/state/notes.ts
  • packages/client-runtime/src/connection/presentation.ts

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


📝 Walkthrough

Walkthrough

Connection presentation state now determines whether a missing notes or automation result keeps its aggregate pending. Only connected and connecting presentations expect an answer.

Changes

Pending state by connection

Layer / File(s) Summary
Define when an answer is expected
packages/client-runtime/src/connection/presentation.ts
Added isAnswerExpected, which returns true for connected and connecting presentations.
Apply expected-answer checks to aggregations
apps/mobile/src/state/notes.ts, apps/web/src/state/notes.ts, apps/web/src/state/automations.ts
Missing non-failure results keep notes and automation aggregates pending only when the presentation expects an answer. The automation isPending comment now refers to reachable environments.

Priority: ⬇️ Low

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

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 0691b

Offline and later-reconnecting environments no longer keep these lists loading, while available results remain visible. No actionable merge-blocking regression is established.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 0691b

The change improves loading behavior when an environment is unreachable. The reviewed paths still request and display environment data as before; the changed rule controls when the lists show a loading state. No security issue was identified, though end-to-end behavior was not verified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • observed — The evidenced changed behavior is the pending state of web automation and web and mobile notes lists; returned automation data remains associated with its environment ID.

Trust Boundaries and Controls

  • inferred — The reviewed automation path does not show an expanded authorization boundary: it continues to request each environment’s results, while the changed predicate governs presentation of missing results.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the primary fix: unreachable environments no longer keep Automations and Notes loading. It is specific and directly related to the changes, although it does not mention the…
Description check ✅ Passed The description clearly explains what changed and why. It omits the template headings and checklist, but the required change rationale is present, and no UI changes require screenshots or video.
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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

@donnes
donnes merged commit e608fdd into main Sep 26, 2026
20 checks passed
@donnes
donnes deleted the t3code/unreachable-env-loading branch September 26, 2026 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant