Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: smooth compose loader to files page transition - #27277

Merged
jeremyruppel merged 3 commits into
mainfrom
jeremy/devex-561-smooth-compose-to-files-transition
Jul 16, 2026
Merged

fix: smooth compose loader to files page transition#27277
jeremyruppel merged 3 commits into
mainfrom
jeremy/devex-561-smooth-compose-to-files-transition

Conversation

@jeremyruppel

@jeremyruppel jeremyruppel commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Summary

During the template builder compose flow, the transition into the template
files page briefly flashed the wizard form again before the files page settled.

Root cause: the loader was gated on createMutation.isPending. When the compose
POST resolved, isPending flipped to false in the same commit that
onSuccess navigated to the files page, so TemplateBuilderPageView repainted
the wizard form for a frame before the route change committed and unmounted it.

Fix: keep the loader mounted while the mutation is pending or succeeded
(createMutation.isPending || createMutation.isSuccess). Since onSuccess
always navigates away, the loader stays until the component unmounts, so the
form never reflashes. The error path is unaffected (isSuccess stays false).

Resolves DEVEX-561.

Screen.Recording.2026-07-15.at.4.27.32.PM.mov

Scope

Targets the wizard form reflash only. Two adjacent items were identified during
investigation and intentionally left out:

  • The destination files page briefly shows its own <Loader /> while it fetches
    template files. Smoothing that requires prefetching before navigation and is a
    larger change.
  • The justCreated "Awesome, you just created a template!" alert is cleared by a
    mount effect, so it renders one frame then disappears. Arguably its own bug.

Happy to follow up on either if wanted.

Testing

  • Biome clean on the changed file.
  • Manual: build a template through the wizard and confirm the loader holds
    straight through to the files page with no form flash.

Stack

Stacked on top of #27276 (DEVEX-593).


Generated by Coder Agents.

…erJob

The template builder create-template flow was the only caller and always
passed nil. The UI shows an indeterminate loader and no progress is streamed
to the client, so the callback is dead code. Remove the parameter and its
per-poll invocation; the function still polls and blocks until the job
completes or the context expires.
…ping

The progress bar animated 0-100% every 5s with an infinite repeat, so it
visibly restarted over and over while a template built, making it look
broken. Replace the looping fill with a single ease-out fill that
decelerates toward 90% and holds until the request resolves and the loader
unmounts.

DEVEX-593
…gation

When the compose POST resolved, createMutation.isPending flipped to false in
the same commit that navigated to the template files page, so the wizard form
repainted for a frame before the route changed. Keep the loader mounted while
the mutation is pending or succeeded so the form never reflashes during the
transition.

DEVEX-561
@linear-code

linear-code Bot commented Jul 15, 2026

Copy link
Copy Markdown

DEVEX-561

jeremyruppel commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

@jeremyruppel jeremyruppel changed the title fix(site/src/pages/TemplateBuilder): keep loader mounted through navigation fix(site/src/pages/TemplateBuilder): smooth compose loader to files page transition Jul 15, 2026
@jeremyruppel
jeremyruppel requested review from aqandrew and aslilac July 15, 2026 20:38
@jeremyruppel
jeremyruppel marked this pull request as ready for review July 15, 2026 20:38
Base automatically changed from jeremy/devex-593-stop-the-build-progress-bar-from-looping-repeatedly to main July 16, 2026 13:14
@jeremyruppel jeremyruppel changed the title fix(site/src/pages/TemplateBuilder): smooth compose loader to files page transition fix: smooth compose loader to files page transition Jul 16, 2026
@jeremyruppel
jeremyruppel merged commit b3ff4ba into main Jul 16, 2026
65 of 67 checks passed
@jeremyruppel
jeremyruppel deleted the jeremy/devex-561-smooth-compose-to-files-transition branch July 16, 2026 13:15
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants