@spunto/design-system 0.13.0 → 0.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spunto/design-system",
3
- "version": "0.13.0",
3
+ "version": "0.13.1",
4
4
  "description": "Spunto's shared design system — warm/flame tokens, color constants, and UI primitives.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -130,10 +130,15 @@ export function RepoList({
130
130
  return (
131
131
  <div className={cn("@container/repos space-y-2", className)}>
132
132
  {repos.length > 0 && (
133
- <div className="mb-1 hidden grid-cols-[1fr_1fr_auto] gap-2 px-1 text-xs text-muted-foreground @min-[30rem]/repos:grid">
134
- <span>Repository</span>
135
- <span>Workspace path</span>
136
- <span />
133
+ // The header mirrors the ROW's flex rules rather than being a grid of
134
+ // its own — the rows stopped being a grid when they had to wrap on a
135
+ // phone, and a grid header over flex rows puts every label next to the
136
+ // wrong field. `size-8` spacer = the width of the row's icon button.
137
+ <div className="mb-1 hidden gap-2 px-1 text-xs text-muted-foreground @min-[34rem]/repos:flex">
138
+ <span className="min-w-0 flex-1">Repository</span>
139
+ <span className="min-w-0 flex-1">Workspace path</span>
140
+ <span className="min-w-0 flex-1 @min-[30rem]/repos:max-w-[9rem]">Branch</span>
141
+ <span className="size-8 shrink-0" />
137
142
  </div>
138
143
  )}
139
144
 
@@ -194,6 +199,17 @@ export function RepoList({
194
199
  onChange={(e) => patch(repo.id, { workspacePath: e.target.value, workspacePathTouched: true })}
195
200
  />
196
201
 
202
+ <Input
203
+ placeholder="default"
204
+ aria-label="Branch"
205
+ title="Branch checked out when a worker clones this repo — empty for the remote's default branch"
206
+ // Narrower than the other two and last to get space: a branch name
207
+ // is short, and "default" is the answer most rows keep.
208
+ className="min-w-0 flex-1 font-mono text-xs @min-[30rem]/repos:max-w-[9rem]"
209
+ value={repo.branch ?? ""}
210
+ onChange={(e) => patch(repo.id, { branch: e.target.value })}
211
+ />
212
+
197
213
  <Button
198
214
  type="button"
199
215
  variant="ghost"
@@ -235,7 +251,8 @@ export function RepoList({
235
251
  </div>
236
252
 
237
253
  <p className="text-xs text-muted-foreground">
238
- Cloned into <code>/workspace/&lt;path&gt;</code> at worker startup.{" "}
254
+ Cloned into <code>/workspace/&lt;path&gt;</code> at worker startup, on the branch set here (empty = the
255
+ remote&apos;s default).{" "}
239
256
  {connectUrl &&
240
257
  (github?.connected ? (
241
258
  <a href={connectUrl} className="underline underline-offset-2">
@@ -27,6 +27,13 @@ export interface ProjectRepo {
27
27
  installationId?: number
28
28
  /** Raw clone URL, `git` provider only. */
29
29
  cloneUrl?: string
30
+ /**
31
+ * Branch checked out when a worker clones this repo. Empty/absent = the
32
+ * remote's default — which is why it's a plain optional string and not a
33
+ * required field with a magic "main" default: we don't know the remote's
34
+ * default, and guessing it wrong is worse than deferring to it.
35
+ */
36
+ branch?: string
30
37
  }
31
38
 
32
39
  /** A devcontainer feature, as the form carries it. */