Skip to content

fix(renderer): break Activity and terminal React #185 loops - #12600

Merged
nwparker merged 3 commits into
stablyai:mainfrom
nwparker:nwparker/eye-React-185
Aug 5, 2026
Merged

nwparker merged 3 commits into
stablyai:mainfrom
nwparker:nwparker/eye-React-185

Conversation

@nwparker

@nwparker nwparker commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Breaks two independent React #185 (Maximum update depth exceeded) crash loops in the renderer.

  • Activity portal publication is now idempotent by descriptor value, so a semantic no-op no longer bounces synchronously through Terminal and back into Activity.
  • Activity readiness burst budget is kept across slot, target, pane, and tab retargeting instead of being re-minted per subscription identity, and a quiet loading pane is explicitly rechecked when the burst window expires.
  • Terminal cold-parking pins verdict bursts to the safe mounted side before React reaches its nested-update limit, with an expiry deadline so tabs can park again.

This supersedes #12492 and #12485.

Commits

  1. fix(renderer): break activity and terminal React 185 loops — the two fixes above.
  2. fix(renderer): harden portal equality, park pin lifetime, churn crumbs — review follow-ups (see AI Review Report).
  3. refactor(terminal): extract the cold-park withholding gate — rebase fallout, see Notes.

Screenshots

No visual change. The user-visible effect is the absence of a crash; both fixes settle existing surfaces on their current rendering (pane stays mounted, portal stays on its last good routing).

Testing

  • pnpm lint
  • pnpm typecheck
  • pnpm test — full renderer green; 3,132 tests across the affected activity/, terminal-pane/, and crash-reporting directories re-run after every change below
  • pnpm build (package + package (windows) green in CI)
  • Added or updated high-quality tests that would catch regressions

Reproduction evidence — verified by re-running the new tests against main with production source unchanged. All four fail on main and pass here:

Test Failure on main
terminal-cold-park-verdict-loop.test.tsx Error: Maximum update depth exceeded (53 verdict flips, budget 5)
activity-terminal-portal-publication-loop.react185.test.tsx Error: Maximum update depth exceeded
activity-portal-readiness-subscription-churn.react185.test.tsx Set{'unavailable','loading'} vs Set{'unavailable'}
activity-portal-readiness-decay.react185.test.tsx expected 'unavailable' to be 'loading'

Recovery is covered too: terminal re-parking after damping, and Activity returning from latched-unavailable to quiet loading without an unrelated DOM mutation.

AI Review Report

Ran the /readiness-checklist review across all seven areas with independent agents per area. No P0 or P1 findings. Verified clean: no unsafe casts; no unbounded growth (eventsAt capped at limit, the flip-record Map is pruned against liveTabIds each pass, timers rebuilt per effect run); no TDZ on the new checkReadiness closure; the release timer provably terminates in one hop; and no wedge path — a pinned tab always retains a scheduled wakeup, and next('ready') unconditionally clears the readiness budget.

Four review findings were fixed in commit 2:

  1. Portal equality was hand-enumerated. Correct for all 8 fields today, but adding a field to ActivityTerminalPortalTarget would have silently suppressed a publish — the stale-routing bug this file exists to prevent. Now keyed off keyof ActivityTerminalPortalTarget via satisfies; confirmed empirically that adding a field is a compile error.
  2. Park-pin lifetime was coupled to the notice window. The 60s notice window starts at the first flip and the pin one burst later, so the window always lapses first and resetFlipWindows released the pin early. Damping and breadcrumbs now gate on pin liveness.
  3. Pin could silence telemetry indefinitely. A tab pinned while cold-park-eligible that stops being a candidate was never re-consulted, so a stale pinnedUntilMs gated both breadcrumb triggers forever. Liveness fixes this too.
  4. The new trigger field was erased by coalescing. terminal_park_verdict_churn was name-only coalesced in src/main/ipc/crash-reporting.ts, collapsing a burst (damping engaged one commit short of fix: improve scrollbar and file explorer scroll behavior #185) into a slow-churn window slot. Now keyed by trigger — still bounded to two slots per storm.

Also addressed the CodeRabbit review: the root?.unmount() guard and the pin-lifetime nitpick are fixed above. The one comment flagged "actionable" — that React 19 routes render errors to onUncaughtError instead of rethrowing from act — was declined with evidence: these tests do not import @testing-library/react at all (raw createRoot + React's own act), and on main the expect(thrown).toBeNull() assertion is precisely the one that fails. Full reply in the thread.

Cross-platform explicitly checked: window.setTimeout/clearTimeout use the DOM overload matching the existing pattern in this directory; all window access sits inside effect bodies, so node-env specs still import cleanly. Date.now() sleep/resume and NTP jumps were checked in both directions — a forward jump empties the churn window and a backward jump releases the pin; neither can wedge a pane. No keyboard shortcuts, paths, or shell behavior touched. Nothing here reaches mobile/ or the paired web client (grep-confirmed).

Security Audit

No input handling, command execution, path handling, auth, secrets, or dependency risk. Renderer-only behavior change; no package.json, lockfile, .npmrc, or patches/ change, and all three branch commits are accounted for. No shell, eval, dynamic require, network sink, or URL is introduced. The only cross-process surface is the existing terminal_park_verdict_churn breadcrumb, whose payload gains one literal string (trigger) and numbers — no user data, and the change is purely additive. ActivityTerminalPortalTarget holds a live HTMLElement and cannot cross IPC; ParkVerdictFlipRecord is useRef-local with no persistence, schema, or migration.

Notes

Rebase fallout (commit 3). main advanced 11 commits under this branch, and #12574 grew use-terminal-tab-cold-parking.ts — the same file this PR grows. Neither is over budget alone, but CI lints the merge, and together they hit 303 effective lines against the 300 limit for .ts. Fixed by extracting terminal-cold-park-withheld-tabs.ts (the last gate between a cold-park candidate and an unmounted pane: watcher coverage and the verdict-flip pin), not by a max-lines disable or a ratchet bump. Ships with 5 tests including the pin-lapse path. Note that a local pnpm lint on a branch behind main cannot catch this class of merge-only violation.

Accepted trade-offs and follow-ups, none release-blocking:

  • Damping scope is narrower than the signal it watches. Flips are counted on the rendered verdict, which unions six inputs, but the pin can only subtract from the cold-park candidate set. Churn from the other inputs is breadcrumbed, not damped. Documented in the module header; a repeating burst crumb for one tab reads as "damping did not reach the oscillating input".
  • Readiness latch now outlives subscription identity. During a genuine 8-flip/500ms burst, a merely-slow pane can be reported unavailable for up to 500ms and swap early. Bounded, self-healing, and deliberately tested — the alternative is the crash.
  • TERMINAL_TAB_PARK_FLIP_COMMIT_COST = 12 is an asserted worst case, not a measurement. The test pins the arithmetic against React's 50-commit bail at exactly that cost, but not the premise.
  • Possible e2e follow-up: ORCA_E2E_TERMINAL_PARKING_DELAY_MS shrinks the park delay to 500ms but the 1s burst window and 60s pin are not overridable. A spec producing 3 park transitions inside 1s would hold a pane mounted for 60s. Not reproduced (needs the Electron e2e run, skipped on this PR); if the parking suite goes flaky, route the burst/pin windows through getTerminalParkingPolicyOverrides.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The change adds sliding-window churn budgets for activity portal readiness and preserves readiness latch state across subscription churn. Activity portal publication now suppresses notifications for semantically identical targets. Thread reconciliation tests cover swap staging and settling. Terminal park-verdict telemetry now applies burst damping and temporary unpark pins. Cold-parking schedules rechecks at pin expiry and restores parking after the pin ends. Regression tests cover these behaviors.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 31.58% 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
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.
Title check ✅ Passed The title clearly summarizes the primary change: breaking Activity and terminal React update-depth loops.
Description check ✅ Passed The description covers the required summary, screenshots, testing, AI review, security audit, and notes with detailed evidence.

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
src/renderer/src/components/terminal-pane/terminal-park-verdict-flip-telemetry.ts (1)

39-46: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Note that a flip-window reset also clears an active pin.

resetFlipWindows clears pinnedUntilMs. recordParkVerdictFlips calls it when elapsedMs >= flipWindowMs. The pin deadline is nowMs + flipWindowMs, and nowMs >= windowStartMs, so the flip window always expires before the pin does. A flip recorded in that gap releases the pin early.

In practice a pinned tab stays unparked, so no verdict flip occurs while the pin holds. An exogenous flip (visibility change, tab removal) is the only way to reach this path, and a fresh window is a reasonable outcome there. Consider stating that intent in the comment, or preserve pinnedUntilMs in resetFlipWindows and clear it only in getParkVerdictUnparkPinUntilMs.

Also applies to: 113-130

src/renderer/src/components/terminal-pane/terminal-cold-park-verdict-loop.test.tsx (1)

212-217: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Guard the unmount when root was never assigned.

afterEach calls root.unmount(). root is assigned inside each test. If createRoot throws, afterEach raises a TypeError and hides the real failure.

🛡️ Proposed guard
   afterEach(() => {
     act(() => {
-      root.unmount()
+      root?.unmount()
     })
     container.remove()
   })

Declare it as let root: Root | undefined.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e5eff714-6c4f-48a0-ac69-109949338585

📥 Commits

Reviewing files that changed from the base of the PR and between 7c26cce and 25c7cdfe603c816da4d4d3afbb35a06f3841971a.

📒 Files selected for processing (19)
  • src/renderer/src/components/activity/ActivityPrototypePage.tsx
  • src/renderer/src/components/activity/activity-portal-churn-budget.test.ts
  • src/renderer/src/components/activity/activity-portal-churn-budget.ts
  • src/renderer/src/components/activity/activity-portal-readiness-decay.react185.test.tsx
  • src/renderer/src/components/activity/activity-portal-readiness-loop.react185.test.tsx
  • src/renderer/src/components/activity/activity-portal-readiness-oscillation.test.ts
  • src/renderer/src/components/activity/activity-portal-readiness-oscillation.ts
  • src/renderer/src/components/activity/activity-portal-readiness-subscription-churn.react185.test.tsx
  • src/renderer/src/components/activity/activity-portal-thread-reconciliation.test.ts
  • src/renderer/src/components/activity/activity-terminal-portal-publication-loop.react185.test.tsx
  • src/renderer/src/components/activity/activity-terminal-portal.test.tsx
  • src/renderer/src/components/activity/activity-terminal-portal.ts
  • src/renderer/src/components/terminal-pane/terminal-cold-park-recheck-deadlines.test.ts
  • src/renderer/src/components/terminal-pane/terminal-cold-park-recheck-deadlines.ts
  • src/renderer/src/components/terminal-pane/terminal-cold-park-verdict-loop.test.tsx
  • src/renderer/src/components/terminal-pane/terminal-park-verdict-flip-telemetry.test.ts
  • src/renderer/src/components/terminal-pane/terminal-park-verdict-flip-telemetry.ts
  • src/renderer/src/components/terminal-pane/use-terminal-tab-cold-parking.test.ts
  • src/renderer/src/components/terminal-pane/use-terminal-tab-cold-parking.ts

Comment on lines +177 to +189
function renderOverlayHost(root: Root): unknown {
const consoleError = vi.spyOn(console, 'error').mockImplementation(() => {})
let thrown: unknown = null
try {
act(() => {
root.render(<OverlayHost />)
})
} catch (error) {
thrown = error
}
consoleError.mockRestore()
return thrown
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🌐 Web query:

React 19 onUncaughtError createRoot render errors no longer rethrown reportError

💡 Result:

In React 19, error handling behavior has been updated to prevent the re-throwing of errors that occur during rendering [1][2][3]. Previously, React would catch errors and re-throw them, which often resulted in duplicate error logs [4][2]. The current behavior in React 19 is as follows: 1. Uncaught Errors: Errors that are not caught by an Error Boundary are reported directly to window.reportError [1][2][3]. They are no longer re-thrown, which avoids triggering duplicate browser-level uncaught error logs [5][2]. 2. Caught Errors: Errors caught by an Error Boundary are reported to console.error [1][2][3]. 3. Customization: To allow developers to hook into these error reporting processes—for example, to send errors to a logging service or to suppress them—React 19 introduced two new configuration options for createRoot and hydrateRoot [6][4][2]: - onUncaughtError: A callback invoked when an error is thrown and not caught by an Error Boundary [6][7]. - onCaughtError: A callback invoked when an error is caught by an Error Boundary [6][7]. These changes were implemented to clean up error logging, reduce duplication, and provide a more predictable interface for production error reporting [4][7][2]. If your application or testing suite relies on the previous behavior of re-throwing errors, you may need to update your configuration using these new root options [2].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf 'Package files:\n'
git ls-files | rg '(^|/)(package\.json|package-lock\.json|pnpm-lock\.yaml|yarn\.lock)$' || true

printf '\nReact version declarations:\n'
rg -n '"react"|"react-dom"|"`@testing-library/react`"' -g 'package.json' -g 'package-lock.json' -g 'pnpm-lock.yaml' -g 'yarn.lock' . || true

printf '\nTarget test outline and relevant sections:\n'
wc -l src/renderer/src/components/terminal-pane/terminal-cold-park-verdict-loop.test.tsx || true
sed -n '1,260p' src/renderer/src/components/terminal-pane/terminal-cold-park-verdict-loop.test.tsx | nl -ba

Repository: stablyai/orca

Length of output: 807


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf 'Target test relevant sections:\n'
sed -n '1,260p' src/renderer/src/components/terminal-pane/terminal-cold-park-verdict-loop.test.tsx | awk '{printf "%5d  %s\n", NR, $0}'

printf '\nReact docs references in test file dependencies:\n'
sed -n '1,80p' package.json | awk '{printf "%5d  %s\n", NR, $0}'

Repository: stablyai/orca

Length of output: 18391


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
from pathlib import Path
import re

root = Path('.')
tsconfig = root / 'config/vitest.config.ts'
vite = root / 'config/vitest.config.ts'
if tsconfig.exists():
    text = tsconfig.read_text(errors='replace')
    if text:
        print('config/vitest.config.ts exists')
        for key in ['browser', 'testEnvironment', 'environment', 'deps', 'external', 'include', 'alias']:
            if key in text:
                print(f'\n--- relevant {key} ---')
                for i, line in enumerate(text.splitlines(), 1):
                    if key in line or key.rstrip('s') in line:
                        start=max(1,i-2); end=min(len(text.splitlines()), i+3)
                        lines=text.splitlines(); print("\n".join(f"{n:5}: {lines[n-1]}" for n in range(start,end+1)))
if vite.exists():
    print('config/vitest.config.ts exists')
PY

printf '\nSearch createRoot usage in renderer frontend tests/source:\n'
rg -n "createRoot\\(" src/mobile src/renderer 2>/dev/null | head -200 || true

printf '\nSearch onUncaughtError usages:\n'
rg -n "onUncaughtError|reportError|Maximum update depth|nested update|act\\(\\(" --glob '*.{ts,tsx,js,jsx}' . | head -200 || true

Repository: stablyai/orca

Length of output: 42940


Capture React 19 render errors through onUncaughtError.

This file uses @testing-library/react 16 with React 19. Uncaught render errors are reported by the root error callback instead of always being rethrown from act. Store uncaught errors and assert both renderedErrors, the optional thrown, and parkVerdictFlipCount so the test does not pass when the nested-update bail is handled by reportError.

@nwparker

nwparker commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Thanks — went through all three. Two fixed, one respectfully declined with evidence.

onUncaughtError / React 19 error routing — declined. I verified this empirically rather than by inference: terminal-cold-park-verdict-loop.test.tsx does not import @testing-library/react at all. It uses raw createRoot from react-dom/client plus React's own act, so RTL 16's uncaught-error routing never enters the picture. I then ran the test against unmodified main source: expect(thrown).toBeNull() is the assertion that fails, with the real Error: Maximum update depth exceeded in the diff. It is not vacuous.

Worth noting for the second test case (settles at the assumed worst-case commit cost), on main the flip count is 5 and the budget is 5, so parkVerdictFlipCount passes — thrown is one of only two assertions actually gating it. Removing it on the theory that it was vacuous would have measurably weakened the test.

Flip-window reset clearing an active pin — fixed, and it was worse than "trivial". You had the mechanism exactly right: the notice window starts at the first flip and the pin one burst later, so the window always lapses first. Rather than only comment the intent, I removed pinnedUntilMs from resetFlipWindows and gated both damping and breadcrumbs on pin liveness (isParkVerdictPinLive).

That also closed a second bug your analysis pointed at indirectly: getParkVerdictUnparkPinUntilMs is only consulted for tabs currently in the cold-park candidate set, so a tab pinned and then made visible was never re-consulted — its stale pinnedUntilMs gated both breadcrumb triggers forever. With liveness the pin self-expires. Covered by two new tests (survives a notice-window expiry that lands mid-pin, plus an expired pins stop gating breadcrumbs block).

root?.unmount() — fixed. Declared let root: Root | undefined and reset it in afterEach.

Separately, a review pass caught something adjacent to your area: the new trigger field was being erased, since terminal_park_verdict_churn is name-only coalesced in src/main/ipc/crash-reporting.ts. A burst crumb (damping engaged one commit short of #185) could collapse into a slow-churn window slot. Now keyed by trigger — still bounded to two slots per storm.

Review follow-ups on the React stablyai#185 loop fix:

- key the portal descriptor equality off `keyof ActivityTerminalPortalTarget`
  so a new field fails the build instead of silently suppressing a publish
- gate damping and breadcrumbs on pin *liveness*, and stop the 60s notice
  window reset from releasing an active pin
- coalesce park-churn breadcrumbs by trigger so a `burst` (damping engaged a
  commit short of stablyai#185) cannot collapse into a slow-churn `window` slot
- document that damping covers only the cold-park input of the verdict
main's stablyai#12574 grew use-terminal-tab-cold-parking.ts alongside this branch, so
the merge crossed the 300-line budget. Move the last gate between a candidate
and an unmounted pane — watcher coverage and the verdict-flip pin — into its
own module rather than ratcheting the limit.
@nwparker
nwparker force-pushed the nwparker/eye-React-185 branch from db2d09a to 5e1a69f Compare August 5, 2026 01:54
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/renderer/src/components/terminal-pane/terminal-cold-park-withheld-tabs.ts (1)

1-8: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Keep comments concise and non-obvious.

  • src/renderer/src/components/terminal-pane/terminal-cold-park-withheld-tabs.ts#L1-L8,L43-L44: Replace the multi-line control-flow and historical comments with one short safety-intent comment.
  • src/renderer/src/components/terminal-pane/terminal-cold-park-withheld-tabs.test.ts#L78-L78: Remove the comment because the adjacent assertion states the same fact.

As per coding guidelines, comments in *.ts must be concise, non-obvious, and brief.

Source: Coding guidelines


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 70eb6de5-a2ff-4906-8079-72179b363cc1

📥 Commits

Reviewing files that changed from the base of the PR and between 5ed4573 and 5e1a69f.

📒 Files selected for processing (23)
  • src/main/ipc/crash-reporting-renderer-breadcrumbs.test.ts
  • src/main/ipc/crash-reporting.ts
  • src/renderer/src/components/activity/ActivityPrototypePage.tsx
  • src/renderer/src/components/activity/activity-portal-churn-budget.test.ts
  • src/renderer/src/components/activity/activity-portal-churn-budget.ts
  • src/renderer/src/components/activity/activity-portal-readiness-decay.react185.test.tsx
  • src/renderer/src/components/activity/activity-portal-readiness-loop.react185.test.tsx
  • src/renderer/src/components/activity/activity-portal-readiness-oscillation.test.ts
  • src/renderer/src/components/activity/activity-portal-readiness-oscillation.ts
  • src/renderer/src/components/activity/activity-portal-readiness-subscription-churn.react185.test.tsx
  • src/renderer/src/components/activity/activity-portal-thread-reconciliation.test.ts
  • src/renderer/src/components/activity/activity-terminal-portal-publication-loop.react185.test.tsx
  • src/renderer/src/components/activity/activity-terminal-portal.test.tsx
  • src/renderer/src/components/activity/activity-terminal-portal.ts
  • src/renderer/src/components/terminal-pane/terminal-cold-park-recheck-deadlines.test.ts
  • src/renderer/src/components/terminal-pane/terminal-cold-park-recheck-deadlines.ts
  • src/renderer/src/components/terminal-pane/terminal-cold-park-verdict-loop.test.tsx
  • src/renderer/src/components/terminal-pane/terminal-cold-park-withheld-tabs.test.ts
  • src/renderer/src/components/terminal-pane/terminal-cold-park-withheld-tabs.ts
  • src/renderer/src/components/terminal-pane/terminal-park-verdict-flip-telemetry.test.ts
  • src/renderer/src/components/terminal-pane/terminal-park-verdict-flip-telemetry.ts
  • src/renderer/src/components/terminal-pane/use-terminal-tab-cold-parking.test.ts
  • src/renderer/src/components/terminal-pane/use-terminal-tab-cold-parking.ts
🚧 Files skipped from review as they are similar to previous changes (21)
  • src/main/ipc/crash-reporting-renderer-breadcrumbs.test.ts
  • src/renderer/src/components/terminal-pane/use-terminal-tab-cold-parking.ts
  • src/renderer/src/components/activity/activity-portal-churn-budget.test.ts
  • src/renderer/src/components/terminal-pane/terminal-park-verdict-flip-telemetry.ts
  • src/renderer/src/components/activity/activity-portal-readiness-loop.react185.test.tsx
  • src/renderer/src/components/terminal-pane/use-terminal-tab-cold-parking.test.ts
  • src/renderer/src/components/terminal-pane/terminal-park-verdict-flip-telemetry.test.ts
  • src/renderer/src/components/activity/ActivityPrototypePage.tsx
  • src/renderer/src/components/terminal-pane/terminal-cold-park-recheck-deadlines.ts
  • src/renderer/src/components/activity/activity-portal-thread-reconciliation.test.ts
  • src/renderer/src/components/activity/activity-terminal-portal-publication-loop.react185.test.tsx
  • src/renderer/src/components/terminal-pane/terminal-cold-park-recheck-deadlines.test.ts
  • src/renderer/src/components/activity/activity-portal-readiness-oscillation.test.ts
  • src/renderer/src/components/activity/activity-portal-readiness-decay.react185.test.tsx
  • src/main/ipc/crash-reporting.ts
  • src/renderer/src/components/activity/activity-terminal-portal.test.tsx
  • src/renderer/src/components/activity/activity-portal-readiness-subscription-churn.react185.test.tsx
  • src/renderer/src/components/terminal-pane/terminal-cold-park-verdict-loop.test.tsx
  • src/renderer/src/components/activity/activity-terminal-portal.ts
  • src/renderer/src/components/activity/activity-portal-churn-budget.ts
  • src/renderer/src/components/activity/activity-portal-readiness-oscillation.ts

@nwparker
nwparker merged commit 5f187e0 into stablyai:main Aug 5, 2026
42 checks passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…tablyai#12600)

Breaks two independent React stablyai#185 (Maximum update depth exceeded) crash loops.

- Activity portal publication is idempotent by descriptor value, so a semantic
  no-op no longer bounces synchronously through Terminal and back into Activity.
- The Activity readiness burst budget survives slot, target, pane, and tab
  retargeting, and a quiet loading pane is rechecked when the window expires.
- Terminal cold-parking pins verdict bursts to the safe mounted side before
  React reaches its nested-update limit, with an expiry so tabs can park again.

Supersedes stablyai#12492 and stablyai#12485.

Portal descriptor equality is keyed off keyof ActivityTerminalPortalTarget so a
new field fails the build instead of silently suppressing a publish. Park-verdict
damping and breadcrumbs gate on pin liveness, and churn crumbs coalesce by
trigger so a burst cannot collapse into a slow-churn slot.
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