Skip to content

Fix/patched terminal recovery#3343

Closed
surlymochan wants to merge 4 commits intosuperset-sh:mainfrom
surlymochan:fix/patched-terminal-recovery
Closed

Fix/patched terminal recovery#3343
surlymochan wants to merge 4 commits intosuperset-sh:mainfrom
surlymochan:fix/patched-terminal-recovery

Conversation

@surlymochan
Copy link
Copy Markdown

@surlymochan surlymochan commented Apr 10, 2026

Description

Related Issues

Type of Change

  • Bug fix
  • New feature
  • Documentation
  • Refactor
  • Other (please describe):

Testing

Screenshots (if applicable)

Additional Notes


Summary by cubic

Improves terminal stability when refocusing and isolates the patched desktop build to its own app data, reducing repaint glitches and avoiding conflicts with the stock app. Also tightens analytics/feature-flag behavior and smooths workspace and Git changes UX.

  • Bug Fixes

    • Terminal: add a short refocus recovery burst (immediate + 120ms + 260ms) with throttle to fully repaint after visibility/focus; force DOM renderer in the patched build; add tests.
    • Terminal attach: register client after snapshot to prevent duplicate/overlapping output; ensure canceled attaches don’t leak; add tests.
    • Keyboard: keep Ctrl+A/E in the terminal; only bubble chords that match registered app hotkeys; add tests.
    • Packaged load: switch to explicit file URL for production to avoid white-screen loads.
    • Git status: include baseBranch in query keys and invalidations; add tests.
  • Refactors

    • Patched build isolation: rename product/appId, use ~/.superset-patched, align userData, and clear browser-only state once via marker; terminal host reads SUPERSET_HOME_DIR.
    • Analytics/flags: gate PostHog init/events behind isPostHogEnabled, replace posthog-js/react with a lightweight useDesktopFeatureFlagEnabled, and guard $pageview/identify calls.
    • Git UI: hide “against base” commits/files when the branch is up to date with upstream; headers/counts adapt accordingly; useGitChangesStatus listens to git:changed and invalidates precisely.
    • New workspace: after importing projects, auto-create/open each main repo workspace and show a pending sidebar row until sync completes.
    • Client cache: add ref-counted cache for @superset/workspace-client providers with cleanup on unmount; add tests.
    • Misc: split a better-auth client chunk, adjust theme background, improve React error logging, and disable unused .codex MCP servers by default.

Written for commit 70b15dc. Summary will update on new commits.

Summary by CodeRabbit

Release Notes

  • New Features

    • Terminal rendering recovery system with automatic refocus/repaint restoration on macOS after focus transitions.
    • Desktop-specific feature flag evaluation system replacing cloud-based configuration.
    • Workspace client reference counting and cache management.
    • Terminal keyboard handler improvements for better input handling.
  • Bug Fixes

    • Fixed terminal content display lag after app focus/window switching.
    • Patched build isolation with dedicated home directory and browser state reset.
  • Style

    • Updated dark theme background color to near-black for improved appearance.
  • Tests

    • Added comprehensive test coverage for terminal recovery, workspace caching, and git status tracking.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 10, 2026

📝 Walkthrough

Walkthrough

This PR introduces a "Superset Patched" desktop application variant with app home directory isolation, browser state reset on first launch, terminal refocus recovery burst improvements, PostHog feature-flag bridging to desktop-specific mechanism, workspace client reference counting, and enhanced git status tracking with workspace awareness. Documentation files outline a macOS terminal rendering lifecycle issue and its multi-burst recovery solution.

Changes

Cohort / File(s) Summary
Configuration & Build
.codex/config.toml, apps/desktop/electron-builder.ts, apps/desktop/package.json, package.json
MCP servers disabled in codex config; Electron Builder updated with hardcoded "Superset Patched" product name, patched app identifier, and disabled macOS signing/notarization; turbo and build tools added to devDependencies.
Build Configuration
apps/desktop/electron.vite.config.ts
Added manual chunk bundling for better-auth client module to optimize code splitting.
Documentation
LOCAL_PATCHES.md, UPSTREAM_ISSUE_terminal_refocus_repaint.md, UPSTREAM_PR_terminal_refocus_repaint.md
New documentation files capturing local patch scope (packaging identity, DOM renderer forcing, sidebar sync), terminal rendering issue on macOS (stale TUI styling after focus/visibility transitions), and proposed recovery burst solution with timing details.
App Initialization & Environment
apps/desktop/src/main/index.ts, apps/desktop/src/main/lib/app-environment.ts, apps/desktop/src/main/lib/app-environment.test.ts, apps/desktop/src/shared/env.shared.ts
Superset home directory isolation with ~/.superset-patched for patched builds; new resetPatchedBrowserStateIfNeeded() called at startup to clear browser state artifacts (Local Storage, Partitions, Preferences) with marker file tracking; workspace name rewrite for patched builds; comprehensive test coverage.
Window Loading & Management
apps/desktop/src/lib/window-loader.ts, apps/desktop/src/main/windows/main.ts, apps/desktop/src/lib/trpc/routers/window.ts
URL construction for file:// loading changed to use explicit pathToFileURL with hash prop; first render control flow corrected to execute window show/maximize/mark-complete within conditional block.
Terminal Host Socket & Sessions
apps/desktop/src/main/terminal-host/index.ts, apps/desktop/src/main/terminal-host/client.ts, apps/desktop/src/main/terminal-host/session.ts, apps/desktop/src/main/terminal-host/session.test.ts, apps/desktop/src/main/terminal-host/session-attach-overlap.test.ts
Home directory resolution updated to respect SUPERSET_HOME_DIR environment variable; Session.attach() now defers client registration until after snapshot boundary, changing cancellation semantics and ordering; new test coverage for attach/snapshot overlap behavior with PTY data race handling.
Terminal Lifecycle & Recovery
apps/desktop/src/renderer/.../TabsContent/Terminal/hooks/useTerminalLifecycle.ts, apps/desktop/src/renderer/.../TabsContent/Terminal/hooks/useTerminalLifecycle.test.ts
Added "recovery burst" mechanism: visibility change and focus restore now schedule reattach recovery immediately, then again at 120ms and 260ms delays to handle delayed terminal repaint settling, replacing single-shot recovery.
Terminal Keyboard Handling
apps/desktop/src/renderer/.../TabsContent/Terminal/helpers.ts, apps/desktop/src/renderer/.../TabsContent/Terminal/helpers.test.ts
Renderer forced to "dom" mode; Ctrl+A/Ctrl+E special-cased to remain in terminal; hotkey bubbling now conditional—only unregistered app hotkeys bubble to PTY instead of all ctrl/meta key events; test coverage added.
PostHog Feature Flag Bridging
apps/desktop/src/renderer/lib/posthog.ts, apps/desktop/src/renderer/lib/useDesktopFeatureFlagEnabled.ts, apps/desktop/src/renderer/providers/PostHogProvider/PostHogProvider.tsx, apps/desktop/src/renderer/components/PostHogUserIdentifier/PostHogUserIdentifier.tsx, apps/desktop/src/renderer/index.tsx, apps/desktop/src/renderer/lib/analytics/index.ts, apps/desktop/src/renderer/lib/boot-errors.ts
New isPostHogEnabled() gate to conditionally disable PostHog entirely; new useDesktopFeatureFlagEnabled() hook for desktop-specific feature flag evaluation independent of PostHog provider; PostHogProvider now renders children directly without React wrapper; error logging enhanced for boot failures; posthog capture and identify gated by enablement flag.
Feature Flag Usage Across Settings & Routes
apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/TopBar/TopBar.tsx, apps/desktop/src/renderer/routes/_authenticated/_dashboard/layout.tsx, apps/desktop/src/renderer/routes/_authenticated/layout.tsx, apps/desktop/src/renderer/routes/_authenticated/components/AgentHooks/.../useCommandWatcher.ts, apps/desktop/src/renderer/routes/_authenticated/settings/*, apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/Terminal/helpers.ts
Systematic replacement of PostHog useFeatureFlagEnabled with desktop-specific useDesktopFeatureFlagEnabled across cloud, workspace, and integration feature gates.
Git Status & Changes Tracking
packages/host-service/src/trpc/router/git/git.ts, apps/desktop/src/renderer/hooks/host-service/useGitStatus/useGitStatus.ts, apps/desktop/src/renderer/hooks/host-service/useGitStatus/useGitStatus.test.ts, apps/desktop/src/renderer/screens/main/hooks/useGitChangesStatus/useGitChangesStatus.ts
Git status hook refactored to sequence branch computation (current branch upstream resolution); query input memoized and standardized; workspace event listener added for cache invalidation; optional workspaceId parameter added for context-aware tracking.
Changes UI & Visibility Control
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/hooks/useChangesTab/*, apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/WorkspaceListItem/WorkspaceListItem.tsx, apps/desktop/src/renderer/screens/main/components/WorkspaceView/RightSidebar/ChangesView/ChangesView.tsx, apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/Terminal/helpers.ts, apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/Terminal/hooks/useTerminalLifecycle.ts, apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/InfiniteScrollView/InfiniteScrollView.tsx
Computed shouldShowCommittedChanges flag gates display of committed/against-base changes based on upstream status and push/pull counts; affects file list visibility across multiple UI layers; sidebar workspace item now derives status from pane tabs.
Workspace & Modal Components
apps/desktop/src/renderer/components/NewWorkspaceModal/NewWorkspaceModal.tsx, apps/desktop/src/renderer/components/NewWorkspaceModal/NewWorkspaceModal.test.ts, apps/desktop/src/renderer/components/NewWorkspaceModal/open-projects.ts, apps/desktop/src/renderer/react-query/workspaces/useOpenMainRepoWorkspace.ts, apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarWorkspaceItem/*
New openProjectsAndWorkspaces helper handles multi-project import with per-project error callbacks; workspace opening now populates pending workspace state in sidebar during Electric sync, clearing after 2s; workspace status derived from pane tabs and passed to sidebar rendering.
Workspace Client Caching
packages/workspace-client/src/providers/WorkspaceClientProvider/WorkspaceClientProvider.tsx
Reference counting added to cached workspace clients: refCount incremented on mount, decremented on unmount; cache cleared when refcount reaches zero; exported test utilities for cache inspection and lifecycle control.
Theming
apps/desktop/src/renderer/globals.css, apps/desktop/src/shared/themes/built-in/ember.ts
Dark theme background color updated from warm-reddish #151110 to near-black #0b0b0c in CSS variable and Ember theme definition.

Sequence Diagram(s)

sequenceDiagram
    participant Terminal as Terminal Component
    participant Lifecycle as useTerminalLifecycle
    participant Emulator as Terminal Emulator
    participant Recovery as Recovery Task

    Terminal->>Lifecycle: Visibility Change / Focus Restore
    Lifecycle->>Lifecycle: scheduleRecoveryBurst()
    Lifecycle->>Recovery: Immediate reattachRecovery(forceResize)
    activate Recovery
    Recovery->>Emulator: clearTextureAtlas(), fit(), refresh()
    Emulator-->>Recovery: Done
    deactivate Recovery
    
    Lifecycle->>Recovery: Schedule 120ms delay
    Recovery->>Emulator: clearTextureAtlas(), fit(), refresh()
    Emulator-->>Recovery: Done
    
    Lifecycle->>Recovery: Schedule 260ms delay
    Recovery->>Emulator: clearTextureAtlas(), fit(), refresh()
    Emulator-->>Recovery: Done
Loading
sequenceDiagram
    participant Provider as WorkspaceClientProvider
    participant Cache as Client Cache
    participant QueryClient as React Query Client
    participant Component as Consuming Component

    Component->>Provider: Mount (getWorkspaceClients)
    Provider->>Cache: Fetch / Create with refCount=0
    Provider->>Cache: Increment refCount
    Cache-->>Provider: Return clients
    Provider-->>Component: Provide to tree
    
    Component->>Component: Use workspace clients
    
    Component->>Provider: Unmount (releaseWorkspaceClients)
    Provider->>Cache: Decrement refCount
    
    alt refCount reaches 0
        Provider->>QueryClient: Clear cache
        Provider->>Cache: Remove entry
        Cache-->>Provider: Done
    end
    
    Provider-->>Component: Cleanup complete
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

The diff spans heterogeneous changes across terminal lifecycle, feature-flag bridging, git status tracking, workspace client reference counting, and UI component updates. Multiple areas contain logic-dense implementations (Session.attach reordering, recovery burst timing, workspace refcounting) requiring separate reasoning. While the feature-flag replacements follow a repetitive pattern, the variety of modifications in terminal handling, git status sequencing, and workspace visibility logic demands careful attention to control-flow correctness and state management consistency across many files.

Possibly related issues

Possibly related PRs

Suggested reviewers

  • Kitenite

Poem

🐰 Patched paths now bloom with clearer sight,
Recovery bursts bring terminals to light,
Reference counts dance in perfect sync,
While feature flags skip PostHog's link—
A burrow of changes, now crisp and bright! 🌙

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 6.82% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The pull request description is entirely blank, containing only the template structure with no filled content in any section. Fill in all required sections: provide a clear description of changes, link related issues, select appropriate change types, document testing performed, and add relevant notes.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main purpose of the PR: fixing terminal recovery in the patched desktop build. It is concise and directly related to a significant portion of the changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 10, 2026

Greptile Summary

This PR addresses a terminal repaint/recovery issue (#1873, #3321) where switching between windows or workspaces could leave the terminal in a visually stale state. The core fix — adding a short "recovery burst" (immediate + 120ms + 260ms repaint passes) in useTerminalLifecycle.ts, plus a retry path when the throttle fires — is sound and well-tested.

However, the PR also includes a set of local-only investigation patches that are explicitly called out in LOCAL_PATCHES.md as "not intended to be sent upstream as-is":

  • Forced DOM renderer in helpers.ts — disables WebGL/hardware acceleration for all users
  • App identity changes in electron-builder.ts — rebrands the production app as \"Superset Patched\" with appId: \"com.superset.desktop.patched\"
  • Patched-build isolation code in app-environment.ts / main/index.ts — adds \"Superset Patched.app\" detection, browser-state reset logic, and altered userData paths
  • Investigation notes (LOCAL_PATCHES.md, UPSTREAM_ISSUE_terminal_refocus_repaint.md, UPSTREAM_PR_terminal_refocus_repaint.md) committed to the repo root

These local patches need to be stripped before the legitimate terminal recovery fix can be safely merged.

Confidence Score: 1/5

Not safe to merge — local-only investigation patches (forced DOM renderer, rebranded app identity, patched-build isolation code) are mixed in with the legitimate terminal recovery fix.

The terminal recovery burst logic and its tests are correct and desirable. However, three P0 issues block merge: (1) the hard-coded return "dom" in getPreferredRenderer would silently degrade rendering for all users; (2) the electron-builder.ts identity changes would ship a rebranded, differently-identified app; (3) LOCAL_PATCHES.md explicitly states the packaging/renderer/isolation changes were never intended for upstream. These must be stripped before the useful parts can land.

apps/desktop/electron-builder.ts, apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/Terminal/helpers.ts, apps/desktop/src/main/lib/app-environment.ts, apps/desktop/src/main/index.ts, and the three root-level markdown files (LOCAL_PATCHES.md, UPSTREAM_ISSUE_terminal_refocus_repaint.md, UPSTREAM_PR_terminal_refocus_repaint.md)

Important Files Changed

Filename Overview
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/Terminal/helpers.ts Dead code: getPreferredRenderer unconditionally returns "dom" on the first line, disabling WebGL for all users — a local-investigation patch that must not ship
apps/desktop/electron-builder.ts App identity changed to "Superset Patched" / "com.superset.desktop.patched" — local-only packaging overrides that would rebrand and break the production release
apps/desktop/src/main/lib/app-environment.ts Adds "Superset Patched" detection (isPatchedDesktopBuild) and browser-state reset helpers — local isolation experiment code that should be removed
apps/desktop/src/main/index.ts Calls resetPatchedBrowserStateIfNeeded() on startup — a no-op on production builds but ties the main entry point to local-investigation code that shouldn't be here
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/Terminal/hooks/useTerminalLifecycle.ts Core fix: adds scheduleRecoveryBurst (immediate + 120ms + 260ms repaint passes) and a throttle-retry path — logic is correct, but indentation is inconsistent in the newly added block
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/Terminal/hooks/useTerminalLifecycle.test.ts Good regression tests for the throttle retry and recovery burst behavior; accurately models the production scheduler logic
apps/desktop/src/main/terminal-host/session-attach-overlap.test.ts New test covering snapshot/broadcast overlap during concurrent attaches — well-structured and adds useful coverage
LOCAL_PATCHES.md Workspace-local investigation notes; self-declares that several included changes "are not intended to be sent upstream as-is" — this file and its siblings should not be committed

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["window.focus / visibilitychange"] --> B["scheduleRecoveryBurst(forceResize)"]
    B --> C["scheduleReattachRecovery — immediate rAF"]
    B --> D["setTimeout 120ms → scheduleReattachRecovery"]
    B --> E["setTimeout 260ms → scheduleReattachRecovery"]

    C --> F{"within 120ms throttle?"}
    F -- No --> G["runReattachRecovery()\nclearTextureAtlas()\nfitAddon.fit()\nxterm.refresh()\nresize if changed\nxterm.focus if focused\nscroll to bottom"]
    F -- Yes --> H["NEW: setTimeout remaining+1ms\n→ scheduleReattachRecovery (retry)"]
    H --> F

    D --> F
    E --> F
Loading

Comments Outside Diff (1)

  1. apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/Terminal/helpers.ts, line 80-109 (link)

    P0 Forced DOM renderer hardcoded for all users

    The return "dom" on line 83 makes every line after it in getPreferredRenderer unreachable dead code. The comment identifies this as a "local patched build" workaround, but if merged it would force the DOM renderer on every user regardless of their stored preference or hardware capability — permanently degrading rendering performance.

    The LOCAL_PATCHES.md file in this PR explicitly lists this as a local-only change "not intended to be sent upstream as-is." This line must be removed before the rest of the terminal recovery fix can be safely shipped.

Reviews (1): Last reviewed commit: "update" | Re-trigger Greptile

Comment on lines +17 to 18
const productName = "Superset Patched";
const macIconPath = join(pkg.resources, "build/icons/icon.icns");
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P0 Local build identity changes must not reach production

productName and appId have been changed to "Superset Patched" / "com.superset.desktop.patched". These are the local packaging identity overrides listed in LOCAL_PATCHES.md as investigation-only. Shipping them would rebrand the production desktop app and break auto-update signing, deep-link routing, and OS-level app identity.

Suggested change
const productName = "Superset Patched";
const macIconPath = join(pkg.resources, "build/icons/icon.icns");
const productName = "Superset";
const macIconPath = join(pkg.resources, "build/icons/icon.icns");
const linuxIconPath = join(pkg.resources, "build/icons");
const winIconPath = join(pkg.resources, "build/icons/icon.ico");
const config: Configuration = {
appId: "com.superset.desktop",
productName,

Comment on lines 29 to +107
@@ -32,6 +60,52 @@ export function ensureSupersetHomeDirExists(): void {
}
}

export function isPatchedDesktopBuild(
execPath: string = process.execPath,
): boolean {
return execPath.includes("Superset Patched.app");
}

export function resetPatchedBrowserStateIfNeeded(
homeDir: string = SUPERSET_HOME_DIR,
execPath: string = process.execPath,
): void {
if (!isPatchedDesktopBuild(execPath)) return;

const markerPath = join(homeDir, PATCHED_BROWSER_STATE_MARKER);
if (existsSync(markerPath)) return;

ensureSupersetHomeDirExists();

for (const relativePath of PATCHED_BROWSER_STATE_PATHS) {
const targetPath = join(homeDir, relativePath);
if (!existsSync(targetPath)) continue;
try {
rmSync(targetPath, { recursive: true, force: true });
} catch {
try {
unlinkSync(targetPath);
} catch (error) {
console.warn(
"[app-environment] Failed to reset patched browser state:",
targetPath,
error,
);
}
}
}

try {
writeFileSync(markerPath, `${new Date().toISOString()}\n`, "utf8");
} catch (error) {
console.warn(
"[app-environment] Failed to write patched browser state marker:",
markerPath,
error,
);
}
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P0 "Superset Patched" isolation code committed to production

isPatchedDesktopBuild, resetPatchedBrowserStateIfNeeded, and PATCHED_BROWSER_STATE_MARKER all exist solely to support the local investigation build (Superset Patched.app). They are guarded by a path-string check, so they would be no-ops on standard builds — but the functions and constants are still being added to the production module.

LOCAL_PATCHES.md explicitly marks the "local app-home / userData isolation experiments" as not intended for upstream. This entire block (lines 29–107) should be removed from the PR.

Comment thread LOCAL_PATCHES.md
Comment on lines +1 to +30
# Superset Local Investigation Notes

This directory contains a workspace-local copy of the Superset Desktop source used to investigate terminal/TUI corruption and repaint issues.

## Local-only patches kept here

These changes were useful for local validation but are not intended to be sent upstream as-is:

- local packaging identity changes for `Superset Patched.app`
- local app-home / userData isolation experiments
- forced DOM renderer in terminal helpers
- local sidebar sync fix after `Open project`

## Upstream candidate patches

The current upstream candidate focuses on the terminal visibility/focus restore path:

- `apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/Terminal/hooks/useTerminalLifecycle.ts`
- `apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/Terminal/hooks/useTerminalLifecycle.test.ts`

## Existing local terminal-host patch context

This copy also includes the `Session.attach()` snapshot/socket ordering fix and tests:

- `apps/desktop/src/main/terminal-host/session.ts`
- `apps/desktop/src/main/terminal-host/session.test.ts`
- `apps/desktop/src/main/terminal-host/session-attach-overlap.test.ts`

That area appears to overlap with the already-open upstream PRs:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Investigation notes should not be committed to the main repo

LOCAL_PATCHES.md, UPSTREAM_ISSUE_terminal_refocus_repaint.md, and UPSTREAM_PR_terminal_refocus_repaint.md are workspace-local investigation notes. The first file even states: "These changes were useful for local validation but are not intended to be sent upstream as-is."

These three markdown files at the repo root should be removed from the PR (or moved to a private/scratch location outside the repository).

Comment on lines +758 to +764
const reattachRecovery = {
throttleMs: 120,
pendingFrame: null as number | null,
lastRunAt: 0,
pendingForceResize: false,
burstTimeouts: [] as number[],
};
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Inconsistent indentation in added recovery block

The reattachRecovery object and the cancelReattachRecovery / scheduleRecoveryBurst functions (lines 758–852) use a different indentation level from the surrounding code — they appear to have been pasted in with an extra leading tab/spaces. Same issue in the cleanup section around lines 885–891.

These should be reformatted to match the rest of the useEffect body before merging.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

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