fix(tooling): keep apps/server/dist across branch checkouts - #421
Merged
Conversation
post-checkout wiped apps/*/dist to clear stale TS emit. Deploy clones and any long-running `t3 serve` read apps/server/dist/client from disk per request, so a Discord-only `git switch` immediately 503s the UI with "Web assets unavailable" until a rebuild. Preserve apps/server/dist; packages/*/dist and tsbuildinfo still clear. Co-authored-by: Andrea Simone Costa <24520167+jfet97@users.noreply.github.com>
Keep the post-checkout skip of apps/server/dist so Discord-only deploys and live t3 serve do not 503 "Web assets unavailable" after git switch.
Branch checkout must keep apps/server/dist/client; wiping it 503s "Web assets unavailable" for Discord-only deploys and live t3 serve.
The bash harness is not on vp test. A vitest file fails CI if post-checkout starts wiping apps/server/dist/client again.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
.githooks/post-checkoutdeletesapps/*/diston every branch checkout. The production server servesapps/server/dist/clientlive from disk, so a Discord-only deploy'sgit switchimmediately returns Web assets unavailable (HTTP 503) until something rebuilds the tree.Fix
Skip
apps/server/distin the emit wipe. Still clear otherapps/*/dist,dist-electron,packages/*/dist, and*.tsbuildinfo.Test plan
https://t3vm.tail86038f.ts.net/opened by andreasimonecosta in chat thread Discord · Discord · T3