Skip to content

Keep the dev window alive during UI reloads - #197

Merged
lastobelus merged 6 commits into
mainfrom
t3code/stable-ui-dev-workflow
Aug 21, 2026
Merged

Keep the dev window alive during UI reloads#197
lastobelus merged 6 commits into
mainfrom
t3code/stable-ui-dev-workflow

Conversation

@lastobelus

@lastobelus lastobelus commented Aug 21, 2026

Copy link
Copy Markdown
Owner

Part of #196.

This is slice 1 of the approved stack. Slice 2, the shared element picker and highlighter, will be based on this PR.

What changes

  • Builds renderer, preload, startup, HTML, CSS, and brand assets into an atomic worktree-local live directory.
  • Reloads that renderer inside the existing Electron process and BrowserWindow, preserving native window geometry and focus.
  • Leaves the last working UI visible when a renderer build fails.
  • Reports main-process or backend edits as restart-required without closing the app.
  • Freezes and flushes mutable review state before reload so in-progress edits are not lost.
  • Lets a replacement watcher attach to the existing live instance; Ctrl-C still performs managed shutdown.
  • Keeps startup mode armed after an initial build failure, so the next valid edit performs the full launch instead of trying to reload a missing process.

Done when

  • Renderer edits reload in the existing process/window.
  • Failed renderer builds preserve the last published UI.
  • Runtime edits do not restart the app automatically.
  • Review edits, attachments, autosave, and workspace state cross the reload durability barrier.
  • Automated gates pass and native PID/geometry/focus QA proves the same window survives.

Excludes

  • The element picker/highlighter (slice 2).
  • Hot-swapping Electron main-process or backend code.
  • Preserving arbitrary renderer in-memory state.
  • Visual changes from Improve Markover review UI #195.
  • Compatibility paths for unreleased prototype behavior.

Validation

  • Build, lint, typecheck, notices: pass.
  • Focused live-reload/durability/service tests: 71/71 pass.
  • Smoke: pass.
  • Full suite: 829/830; the existing order-sensitive remote-creation-journal concurrency assertion observed the same two valid digests in reverse order. Its focused file passes 7/7.
  • Native QA: successful CSS reload, deliberate renderer build failure, recovery reload, and QA cleanup all retained PID 33981, native window 14598, and bounds 1180x760 @ (145,34). LastCode remained frontmost throughout.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4abdbf69b0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/development-watch.ts
Comment thread src/local-client.ts
@lastobelus

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 82b141deba

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/main.ts
@lastobelus
lastobelus force-pushed the t3code/stable-ui-dev-workflow branch from 82b141d to a124443 Compare August 21, 2026 18:49
@lastobelus

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a12444398f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/development-watch.ts Outdated
@lastobelus

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: ec9c694ca4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@lastobelus
lastobelus merged commit 8377a9f into main Aug 21, 2026
1 check 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