Commit 3621a45
authored
feat: branch deployment previews via
* refactor: convert project layout to Svelte 5 runes and extract shared utilities
- Migrate `+layout.svelte` from Svelte 4 to Svelte 5 runes (`$derived`, `$effect`, `$props`)
- Extract `baseGetProjectQueryOptions` polling config to `project-query-options.ts`
- Extract `resolveRuntimeConnection` to `project-runtime.ts` with unit tests
- Remove duplicate mock query chain from `ProjectHeader` (layout already passes mock-aware permissions)
- Add section comments and component-level doc block to layout
* chore: clean up `features/projects` directory
- Delete `invalidations.ts` (dead code, zero consumers)
- Delete `ResourceError.svelte` (dead code, shadowed by `web-common` version)
- Move `constants.ts` to `user-management/constants.ts` (closer to its only consumer)
* fix: update remaining `constants` import paths after file move
* fix: update `ResourceError` import to use `web-common` version
* refactor: bundle mock user params in `resolveRuntimeConnection`
Replace three positional mock params (userId, credentials, permissions)
with a single `mockUser` object. The caller constructs it or passes
undefined, so the "all or nothing" relationship is enforced by the type
system rather than a runtime check.
* refactor: remove unnecessary derived wrappers in project layout
Remove `pageData`, `pathname`, and `projectError` — pure aliases that
add indirection without simplifying anything. Use `page.data`,
`page.url.pathname`, and `$projectQuery.error` directly.
* feat: add branch deployment selector and Deployments management page
Branch deployment UI:
- Add BranchSelector component in project header breadcrumbs
- Extract branch from URL's @Branch path segment via `extractBranchFromPath`
- Inject active branch into intra-project navigations via `handleBranchNavigation`
- Pass branch param to GetProject and GetDeploymentCredentials queries
- Add BranchDeploymentStopped component for stopped/stopping states
- Keep BranchSelector's ListDeployments query in sync on status transitions
- Poll during STOPPING status
Deployments page:
- Add Deployments management page under Status tab
- Add `createSmartRefetchInterval` for filtered resource polling
- Add branch deployment hint to Deployments page
- Extract shared deployment utilities to `deployment-utils.ts`
* fix: eliminate branch switch lag by optimistically seeding project cache
When the user selects a branch in the dropdown, seed the GetProject
query cache with the deployment data already available from
ListDeployments. This lets the layout's RuntimeProvider re-key
immediately instead of waiting for the network round-trip.
* Revert "fix: eliminate branch switch lag by optimistically seeding project cache"
This reverts commit ad43959.
* refactor: simplify `DeploymentsSection` and migrate to Svelte 5
- Migrate to Svelte 5 runes ($props, $derived, $state)
- Extract cache manipulation into deployment-actions.ts
- Replace 4 tracking Sets with single pendingId string
- Replace deletedIds with optimistic cache removal
- Consolidate delete dialog state into single nullable object
- Fix CopyableCodeBlock on:click -> onclick (Svelte 5)
- Fix parseInt missing radix, redundant isProdDeployment call
- Fix status overview showing "main" instead of deployment branch
- Fix polling gap: keep polling when only ProjectParser exists during startup
- Show loading spinner instead of "no dashboards" during initial build
* feat: show spinner for transitory deployment statuses
Replace the static yellow dot with a `LoadingCircleOutline` spinner
for in-progress states (Pending, Updating, Stopping, Deleting) in
both the Deployments table and overview card.
* fix: surface project parser errors on deployment overview page
When a branch deployment's runtime is running but the project failed
to load (e.g., git branch doesn't exist), the overview page was
misleadingly showing "Ready" with stale data. Now:
- Deployment card shows parser error in a Callout, replacing
project-level rows (Last synced, OLAP, AI) that would be defaults
- Infrastructure status stays truthful (separate from project health)
- Resources/Tables/Errors sections hidden when project failed to load
- Download Project button disabled instead of hidden
- ErrorsSection no longer has a confusing parent click handler
* fix: review feedback — deduplicate status set, fix dark mode border, add deployment-utils tests
- Replace `TRANSIENT_STATUSES` Set with existing `isTransitoryStatus()` in `DeploymentsSection`
- Use semantic `border-border` instead of `border-gray-200` on data rows
- Use index fallback for `{#each}` key when `deployment.id` is undefined
- Add `deduplicateDeployments` unit tests
- Document web-admin vitest usage in CLAUDE.md
* fix: revert unrelated `download-report.ts` change from bad merge
* fix: review feedback — data-driven tests, remove `deduplicateDeployments`
Restructure branch-utils tests to use shared test data array per
reviewer suggestion. Remove `deduplicateDeployments` since the backend
guards against duplicates at creation time (a DB constraint follow-up
is needed for race conditions).
* fix: review feedback — rename `mutateFn`, extract delete dialog, sort branches alphabetically@branch path segments (#9011)1 parent faabb5c commit 3621a45
31 files changed
Lines changed: 2064 additions & 213 deletions
File tree
- .claude
- web-admin/src
- features
- authentication
- branches
- dashboards/listing
- projects
- status
- deployments
- overview
- lib
- routes/[organization]/[project]
- -/status
- deployments
- web-common/src/components
- calls-to-action
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
Lines changed: 29 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| 32 | + | |
| 33 | + | |
30 | 34 | | |
31 | 35 | | |
32 | 36 | | |
| |||
85 | 89 | | |
86 | 90 | | |
87 | 91 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
98 | 111 | | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
117 | 116 | | |
118 | 117 | | |
119 | 118 | | |
| |||
Lines changed: 96 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
0 commit comments