@fungi.computer/bonsai 0.6.41 → 0.6.43

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/CHANGELOG.md CHANGED
@@ -1,5 +1,43 @@
1
1
  # @fungi.computer/bonsai
2
2
 
3
+ ## 0.6.43
4
+
5
+ ### Patch Changes
6
+
7
+ - Changes since 0.6.42:
8
+
9
+ - fix(bonsai): start the Working now label at its rows' edge
10
+ - fix(tourtois,bonsai): tighten desktop, Settings and Bonsai alignment
11
+
12
+ - Updated dependencies
13
+ - Updated dependencies
14
+ - Updated dependencies
15
+ - @fungi.computer/caps@0.10.7
16
+ - @fungi.computer/oyster@0.20.5
17
+ - @fungi.computer/trellis@0.10.11
18
+
19
+ ## 0.6.42
20
+
21
+ ### Patch Changes
22
+
23
+ - Changes since 0.6.41:
24
+
25
+ - fix(caps): put the panel on the card face and cap Bonsai Changes width
26
+ - fix(caps): make the empty-state panel a solid card, not a dashed drop zone
27
+ - fix(bonsai): solid cards, guarded one-click starters, phone tab gap
28
+ - fix(bonsai): empty Changes card, one-click starter repos, quieter Arrange
29
+ tiles
30
+ - fix(bonsai): tidy first-run Code, Changes, consent, tabs and diff
31
+
32
+ - Updated dependencies
33
+ - Updated dependencies
34
+ - Updated dependencies
35
+ - Updated dependencies
36
+ - @fungi.computer/caps@0.10.6
37
+ - @fungi.computer/nacre@0.4.6
38
+ - @fungi.computer/oyster@0.20.4
39
+ - @fungi.computer/trellis@0.10.10
40
+
3
41
  ## 0.6.41
4
42
 
5
43
  ### Patch Changes
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@fungi.computer/bonsai",
3
- "version": "0.6.41",
3
+ "version": "0.6.43",
4
4
  "author": "Levi <levi@technomancy.dev>",
5
5
  "type": "module",
6
6
  "description": "Bonsai: a git platform for many agents working at once, on Workers and Artifacts",
7
7
  "dependencies": {
8
8
  "@fungi.computer/agar": "0.9.1",
9
- "@fungi.computer/caps": "0.10.5",
9
+ "@fungi.computer/caps": "0.10.7",
10
10
  "@fungi.computer/issues": "0.2.0",
11
- "@fungi.computer/oyster": "0.20.3",
11
+ "@fungi.computer/oyster": "0.20.5",
12
12
  "@fungi.computer/puffball": "0.5.5",
13
13
  "@fungi.computer/sigils": "0.3.1",
14
14
  "@fungi.computer/stipe": "0.1.1",
@@ -29,8 +29,8 @@
29
29
  "@fungi.computer/maosaico": "0.1.2",
30
30
  "@visx/hierarchy": "3.12.0",
31
31
  "@fungi.computer/gills": "0.3.0",
32
- "@fungi.computer/nacre": "0.4.5",
33
- "@fungi.computer/trellis": "0.10.9",
32
+ "@fungi.computer/nacre": "0.4.6",
33
+ "@fungi.computer/trellis": "0.10.11",
34
34
  "@fungi.computer/braid": "0.4.8",
35
35
  "@fungi.computer/workflows-wire": "0.4.8"
36
36
  },
@@ -475,7 +475,14 @@ if (fresh) {
475
475
  lastPushAt: Date.now() - 20_000,
476
476
  });
477
477
  detail.refs = [{ name: "refs/heads/main", hash: first }];
478
- const firstCommit = { ...fixtureCommit, hash: first, parents: [] };
478
+ const firstCommit = {
479
+ ...fixtureCommit,
480
+ hash: first,
481
+ parents: [],
482
+ message: "Add README",
483
+ committedAt: Math.floor(Date.now() / 1000),
484
+ author: { name: "Levi", email: "fixture@example.test" },
485
+ };
479
486
  client.setQueryData(["graph", "koi-pond"], graph);
480
487
  client.setQueryData(["agents"], { agents: agents.slice(0, 1) });
481
488
  client.setQueryData(["repo", "koi-pond"], detail);
@@ -505,6 +512,33 @@ if (fresh) {
505
512
  text: "# koi-pond\n",
506
513
  size: 11,
507
514
  });
515
+ client.setQueryData(["commit", "koi-pond", first], {
516
+ commit: {
517
+ ...firstCommit,
518
+ message: "Add README",
519
+ author: { name: "Levi", email: "fixture@example.test" },
520
+ committedAt: Math.floor(Date.now() / 1000),
521
+ },
522
+ agent: "Levi",
523
+ diff: {
524
+ files: [
525
+ {
526
+ path: "README.md",
527
+ oldPath: null,
528
+ status: "added",
529
+ additions: 1,
530
+ deletions: 0,
531
+ binary: false,
532
+ truncated: false,
533
+ oldText: "",
534
+ newText: "# koi-pond\n",
535
+ },
536
+ ],
537
+ additions: 1,
538
+ deletions: 0,
539
+ omittedFiles: 0,
540
+ },
541
+ });
508
542
  const freshEvents = {
509
543
  events: [
510
544
  {
@@ -125,6 +125,7 @@ async function fixture(
125
125
  RouterProvider,
126
126
  null,
127
127
  createElement(CodeTab, {
128
+ colors: new Map(),
128
129
  route: {
129
130
  page: "repo",
130
131
  repo: "pond",
@@ -11,7 +11,7 @@ import { createCapabilityRegistry } from "@fungi.computer/agar";
11
11
  import { appMethods } from "@fungi.computer/agar/backend";
12
12
  import { HomePage } from "../web/home-page.js";
13
13
  import { HostGitAccess } from "../web/host-access.js";
14
- import { RouterProvider } from "../web/router.js";
14
+ import { RouterProvider, useRouter } from "../web/router.js";
15
15
  import { connect } from "../web/transport.js";
16
16
  import type { JsonValue } from "../shared/contract.js";
17
17
 
@@ -77,6 +77,15 @@ const render = async (child: ReturnType<typeof createElement>) => {
77
77
  });
78
78
  };
79
79
 
80
+ function RoutePanel() {
81
+ const { route } = useRouter();
82
+ return createElement(
83
+ "output",
84
+ { "data-route": true },
85
+ route.page === "repo" ? `repo:${route.repo}:${route.tab}` : route.page,
86
+ );
87
+ }
88
+
80
89
  describe("Bonsai home page", () => {
81
90
  it("shows the live board and no README section", async () => {
82
91
  callMethod.mockImplementation((method) => {
@@ -183,6 +192,94 @@ describe("Bonsai home page", () => {
183
192
  expect(container.textContent).not.toContain("Loading repositories");
184
193
  });
185
194
 
195
+ describe("starter repository chips", () => {
196
+ const mount = async (create: (input: string) => Promise<JsonValue>) => {
197
+ callMethod.mockImplementation((method, input) => {
198
+ switch (method) {
199
+ case "repos.list":
200
+ return Promise.resolve({ repos: [] });
201
+ case "actors.list":
202
+ return Promise.resolve({ agents: [] });
203
+ case "activity.list":
204
+ return Promise.resolve({ events: [] });
205
+ case "repos.create":
206
+ return create(input);
207
+ default:
208
+ return Promise.reject(new Error(`unexpected method ${method}`));
209
+ }
210
+ });
211
+ await render(
212
+ createElement(
213
+ RouterProvider,
214
+ null,
215
+ createElement(HomePage, {
216
+ live: { connected: true, error: null, fresh: new Set<number>() },
217
+ }),
218
+ createElement(RoutePanel),
219
+ ),
220
+ );
221
+ };
222
+ const chip = (label: string) =>
223
+ [
224
+ ...container.querySelectorAll<HTMLButtonElement>(
225
+ "ul[aria-label] button",
226
+ ),
227
+ ].find((button) => button.textContent.startsWith(label));
228
+ const created = (name: string) => ({
229
+ name,
230
+ description: null,
231
+ parent: null,
232
+ owner: null,
233
+ createdAt: 1,
234
+ lastPushAt: null,
235
+ forks: [],
236
+ openChanges: 0,
237
+ activity: [],
238
+ });
239
+
240
+ it("creates with a README once and opens Overview, even on a double click", async () => {
241
+ let finish: (value: JsonValue) => void = () => undefined;
242
+ await mount(
243
+ () =>
244
+ new Promise<JsonValue>((resolve) => {
245
+ finish = resolve;
246
+ }),
247
+ );
248
+ await act(async () => {
249
+ chip("notes")?.click();
250
+ chip("notes")?.click();
251
+ await Promise.resolve();
252
+ });
253
+ expect(
254
+ callMethod.mock.calls.filter(([method]) => method === "repos.create"),
255
+ ).toEqual([
256
+ ["repos.create", JSON.stringify({ name: "notes", readme: true })],
257
+ ]);
258
+ expect(chip("website")?.disabled).toBe(true);
259
+ await act(async () => {
260
+ finish(created("notes"));
261
+ await Promise.resolve();
262
+ await Promise.resolve();
263
+ await Promise.resolve();
264
+ });
265
+ expect(container.querySelector("output[data-route]")?.textContent).toBe(
266
+ "repo:notes:overview",
267
+ );
268
+ });
269
+
270
+ it("opens the form with the name and the error when creating fails", async () => {
271
+ await mount(() => Promise.reject(new Error("notes already exists")));
272
+ await act(async () => {
273
+ chip("notes")?.click();
274
+ await Promise.resolve();
275
+ await Promise.resolve();
276
+ await Promise.resolve();
277
+ });
278
+ const input = document.querySelector("input");
279
+ expect(input instanceof HTMLInputElement && input.value).toBe("notes");
280
+ expect(document.body.textContent).toContain("notes already exists");
281
+ });
282
+ });
186
283
  it("leads with Approve Git access while Bonsai lacks it, then offers New repository", async () => {
187
284
  const capabilities = createCapabilityRegistry();
188
285
  capabilities.provide(appMethods, { call: callMethod });
@@ -643,6 +643,7 @@ it("opening Code makes zero code-insight calls", async () => {
643
643
  RouterProvider,
644
644
  null,
645
645
  createElement(CodeTab, {
646
+ colors: new Map(),
646
647
  route: {
647
648
  page: "repo",
648
649
  repo: "pond",
package/web/bonsai.css CHANGED
@@ -158,6 +158,10 @@ body {
158
158
  padding: 0;
159
159
  list-style: none;
160
160
  }
161
+ /* The rows below have no row padding, so the label starts at their edge. */
162
+ .bonsai-working-heading {
163
+ padding-inline: 0;
164
+ }
161
165
  .bonsai-working li {
162
166
  display: grid;
163
167
  grid-template-columns: auto minmax(0, 1fr) auto;
@@ -393,6 +397,17 @@ body {
393
397
  .bonsai-markdown.bonsai-markdown-tile {
394
398
  padding: 0;
395
399
  }
400
+ /* The change description starts at the meta line's edge. */
401
+ .bonsai-change-body > .bonsai-markdown {
402
+ padding-inline: 0;
403
+ }
404
+ /* Tile bodies start at the tile's own padding, like the text around them. */
405
+ .bonsai-next-list > .list-row {
406
+ padding-inline: 0;
407
+ }
408
+ .bonsai-tile-content .caps-screen-cells {
409
+ margin-inline: calc(var(--spacing-md) * -1);
410
+ }
396
411
  .bonsai-change-list .list-row {
397
412
  grid-template-columns: minmax(0, 1fr) auto;
398
413
  align-items: center;
@@ -485,6 +500,10 @@ body {
485
500
  }
486
501
  }
487
502
  @media (max-width: 640px) {
503
+ /* Zoom buttons get their own row above the lanes instead of covering them. */
504
+ .bonsai-network {
505
+ padding-block-start: var(--caps-touch-target, 2.75rem);
506
+ }
488
507
  .bonsai-page {
489
508
  padding: var(--spacing-lg) var(--spacing-lg) var(--spacing-2xl);
490
509
  }
@@ -696,3 +715,20 @@ body {
696
715
  .bonsai-next-steps li p + p {
697
716
  color: var(--stipe-fg-muted);
698
717
  }
718
+
719
+ /* Phone: six repository tabs fit the row instead of clipping at either end. */
720
+ @media (max-width: 480px) {
721
+ .bonsai-repo
722
+ [aria-label="Repository sections"]
723
+ .caps-navigation-rail-content {
724
+ gap: var(--spacing-2xs);
725
+ justify-content: space-between;
726
+ }
727
+ .bonsai-repo
728
+ [aria-label="Repository sections"]
729
+ .caps-navigation-rail-content
730
+ > a {
731
+ padding-inline: var(--spacing-xs);
732
+ font-size: var(--text-sm);
733
+ }
734
+ }
@@ -442,7 +442,11 @@ export function ChangePage({ repo, number }: { repo: string; number: number }) {
442
442
  </>
443
443
  ) : null}
444
444
  </p>
445
- {change.body ? <Markdown text={change.body} /> : null}
445
+ {change.body ? (
446
+ <div className="bonsai-change-body">
447
+ <Markdown text={change.body} />
448
+ </div>
449
+ ) : null}
446
450
  {change.conflict ? (
447
451
  <Alert
448
452
  tone="warning"
@@ -527,7 +531,10 @@ export function ChangePage({ repo, number }: { repo: string; number: number }) {
527
531
  {agent ? (
528
532
  <AgentName name={agent} colors={colors} />
529
533
  ) : (
530
- actorLabel(commit.author.name)
534
+ actorLabel(
535
+ commit.author.name,
536
+ colors.get(commit.author.name)?.you,
537
+ )
531
538
  )}{" "}
532
539
  · {shortHash(commit.hash)} ·{" "}
533
540
  {relativeTime(commit.committedAt * 1000)}
package/web/code-tab.tsx CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  relativeTime,
15
15
  shortHash,
16
16
  } from "./format.js";
17
- import { Loading, Failure } from "./parts.js";
17
+ import { Loading, Failure, type AgentColors } from "./parts.js";
18
18
  import { QuickSetup } from "./quick-setup.js";
19
19
  import { href, Link, useRouter, type Route } from "./router.js";
20
20
  import { FileView, Markdown, RepoTree } from "./views.js";
@@ -22,9 +22,11 @@ import { FileView, Markdown, RepoTree } from "./views.js";
22
22
  export function CodeTab({
23
23
  route,
24
24
  detail,
25
+ colors,
25
26
  }: {
26
27
  route: Extract<Route, { page: "repo" }>;
27
28
  detail: RepoDetail;
29
+ colors: AgentColors;
28
30
  }) {
29
31
  const { go } = useRouter();
30
32
  const [wide, setWide] = useState(false);
@@ -222,7 +224,11 @@ export function CodeTab({
222
224
  ) : null}
223
225
  {files.data ? (
224
226
  <p className="text-sm text-[var(--stipe-fg-muted)]">
225
- Latest commit · {actorLabel(files.data.commit.author.name)}{" "}
227
+ Latest commit ·{" "}
228
+ {actorLabel(
229
+ files.data.commit.author.name,
230
+ colors.get(files.data.commit.author.name)?.you,
231
+ )}{" "}
226
232
  ·{" "}
227
233
  <Link
228
234
  to={href({
package/web/home-page.tsx CHANGED
@@ -1,10 +1,10 @@
1
- import { useEffect, useMemo, useState } from "react";
1
+ import { useEffect, useMemo, useRef, useState } from "react";
2
2
  import { DataListHeading } from "@fungi.computer/caps/components/data-list";
3
3
  import { Status } from "@fungi.computer/caps/components/status";
4
4
  import { EmptyState } from "@fungi.computer/caps/blocks/empty-state";
5
5
  import { GitBranch } from "lucide-react";
6
+ import { useQueryClient } from "@tanstack/react-query";
6
7
  import { Button } from "@fungi.computer/caps/components/button";
7
- import { SetupNotice } from "@fungi.computer/caps/blocks/setup-notice";
8
8
  import { NewRepositoryDialog } from "./new-repository.js";
9
9
  import { useHostGitAccess } from "./host-access.js";
10
10
  import { requestGitAccess } from "./transport.js";
@@ -14,6 +14,7 @@ import {
14
14
  useGraph,
15
15
  useChanges,
16
16
  useEvents,
17
+ createRepository,
17
18
  type LiveState,
18
19
  } from "./api.js";
19
20
  import { BonsaiBoard, type BoardTile } from "./board.js";
@@ -186,7 +187,47 @@ export function HomePage({ live }: { live: LiveState }) {
186
187
  name: "",
187
188
  count: 0,
188
189
  });
189
- const startWith = (name: string) => {
190
+ const client = useQueryClient();
191
+ const { go } = useRouter();
192
+ // A suggested name creates the repository with a README right away; if that
193
+ // fails the form opens, prefilled, with the error shown.
194
+ // The ref closes the gap before the busy state renders (a fast double click).
195
+ const starting = useRef(false);
196
+ const [startingName, setStartingName] = useState<string | null>(null);
197
+ const [startError, setStartError] = useState<string | null>(null);
198
+ const createNamed = async (name: string): Promise<void> => {
199
+ if (starting.current) return;
200
+ starting.current = true;
201
+ setStartingName(name);
202
+ const result = await createRepository({ name, readme: true }).then(
203
+ (created) => ({ created }),
204
+ (error: unknown) => ({ error }),
205
+ );
206
+ starting.current = false;
207
+ setStartingName(null);
208
+ if ("created" in result) {
209
+ await client.invalidateQueries({ queryKey: ["repos"] });
210
+ go(
211
+ href({
212
+ page: "repo",
213
+ repo: result.created.name,
214
+ tab: "overview",
215
+ ref: null,
216
+ file: null,
217
+ path: "",
218
+ }),
219
+ );
220
+ return;
221
+ }
222
+ startWith(
223
+ name,
224
+ result.error instanceof Error
225
+ ? result.error.message
226
+ : "Couldn't create it.",
227
+ );
228
+ };
229
+ const startWith = (name: string, error: string | null = null) => {
230
+ setStartError(error);
190
231
  setPreset((current) => ({ name, count: current.count + 1 }));
191
232
  setCreating(true);
192
233
  };
@@ -281,7 +322,9 @@ export function HomePage({ live }: { live: LiveState }) {
281
322
  <>
282
323
  {workingNow(events.data.events).length ? (
283
324
  <>
284
- <DataListHeading>Working now</DataListHeading>
325
+ <DataListHeading className="bonsai-working-heading">
326
+ Working now
327
+ </DataListHeading>
285
328
  <WorkingNow events={events.data.events} colors={colors} />
286
329
  </>
287
330
  ) : null}
@@ -343,19 +386,19 @@ export function HomePage({ live }: { live: LiveState }) {
343
386
  />
344
387
  ) : repos.data.repos.length === 0 ? (
345
388
  missing ? (
346
- <SetupNotice
347
- className="bonsai-onboarding"
348
- variant="panel"
349
- need="Bonsai needs Git access to save your repositories"
350
- cause="Keep files and their history, with a separate working copy for each AI helper."
351
- visual={<GitBranch aria-hidden="true" />}
352
- fix={{
353
- label: "Approve Git access",
354
- onSelect: () => void approveAccess(),
355
- pending: asking,
356
- }}
357
- waitingFor="your answer"
358
- />
389
+ <div className="bonsai-onboarding">
390
+ <EmptyState
391
+ variant="panel"
392
+ visual={<GitBranch aria-hidden="true" />}
393
+ title="Bonsai needs Git access to save your repositories"
394
+ description="Keep files and their history, with a separate working copy for each AI helper."
395
+ primaryAction={{
396
+ label: "Approve Git access",
397
+ onSelect: () => void approveAccess(),
398
+ pending: asking,
399
+ }}
400
+ />
401
+ </div>
359
402
  ) : (
360
403
  <div className="bonsai-onboarding">
361
404
  <EmptyState
@@ -371,8 +414,10 @@ export function HomePage({ live }: { live: LiveState }) {
371
414
  }}
372
415
  suggestions={["notes", "website", "experiments"].map((label) => ({
373
416
  label,
417
+ pending: startingName === label,
418
+ disabled: startingName !== null,
374
419
  onSelect: () => {
375
- startWith(label);
420
+ void createNamed(label);
376
421
  },
377
422
  }))}
378
423
  />
@@ -400,6 +445,7 @@ export function HomePage({ live }: { live: LiveState }) {
400
445
  open={creating}
401
446
  onOpenChange={setCreating}
402
447
  initialName={preset.name}
448
+ initialError={startError}
403
449
  />
404
450
  <BonsaiBoard
405
451
  rowHeight={0}
package/web/insights.tsx CHANGED
@@ -149,7 +149,7 @@ function Grid({
149
149
  ) : (
150
150
  <Button
151
151
  size="sm"
152
- variant="outline"
152
+ variant="ghost"
153
153
  onClick={() => {
154
154
  setEditing(true);
155
155
  }}
@@ -24,11 +24,14 @@ export function NewRepositoryDialog({
24
24
  open,
25
25
  onOpenChange,
26
26
  initialName = "",
27
+ initialError = null,
27
28
  }: {
28
29
  open: boolean;
29
30
  onOpenChange: (open: boolean) => void;
30
31
  /** A suggested name to start from, chosen from the empty state. */
31
32
  initialName?: string;
33
+ /** Why a one-click start failed, shown when the form opens instead. */
34
+ initialError?: string | null;
32
35
  }) {
33
36
  const client = useQueryClient();
34
37
  const { go } = useRouter();
@@ -38,7 +41,7 @@ export function NewRepositoryDialog({
38
41
  const [creating, setCreating] = useState(false);
39
42
  const [needsAccess, setNeedsAccess] = useState(false);
40
43
  const [waiting, setWaiting] = useState(false);
41
- const [failure, setFailure] = useState<string | null>(null);
44
+ const [failure, setFailure] = useState<string | null>(initialError);
42
45
  const problem = repoNameProblem(name);
43
46
  const shownProblem = touched ? problem : null;
44
47
 
package/web/overview.tsx CHANGED
@@ -177,7 +177,9 @@ export function Overview({
177
177
  <>
178
178
  {working.length > 0 ? (
179
179
  <>
180
- <DataListHeading>Working now</DataListHeading>
180
+ <DataListHeading className="bonsai-working-heading">
181
+ Working now
182
+ </DataListHeading>
181
183
  <WorkingNow events={activity} colors={colors} />
182
184
  </>
183
185
  ) : null}
@@ -232,7 +234,7 @@ export function Overview({
232
234
  add(
233
235
  "next",
234
236
  <>
235
- <DataList>
237
+ <DataList className="bonsai-next-list">
236
238
  {next.slice(0, 3).map((issue) => (
237
239
  <DataRow key={issue.id}>
238
240
  <Link to={repoLink("issues", issue.path)}>{issue.title}</Link>
package/web/pages.tsx CHANGED
@@ -15,7 +15,7 @@ import { ChangeGroups, needsAttention } from "./change-rows.js";
15
15
  import { RepoNavigation } from "./repo-navigation.js";
16
16
  import { RepoSettings } from "./repo-settings.js";
17
17
  /** Bonsai's pages: the repository list, a repository, and a commit. */
18
- import { ChevronRight } from "lucide-react";
18
+ import { ChevronRight, GitPullRequest } from "lucide-react";
19
19
  import { useEffect, useMemo, useState } from "react";
20
20
  import type { RepoDetail } from "../shared/contract.js";
21
21
  import {
@@ -49,7 +49,6 @@ function useColors(): AgentColors {
49
49
  export type RepoRoute = Extract<Route, { page: "repo" }>;
50
50
 
51
51
  function ChangesTab({ repo, colors }: { repo: string; colors: AgentColors }) {
52
- const { go } = useRouter();
53
52
  const changes = useChanges(repo);
54
53
  if (changes.isPending) return <Loading label="Loading changes" />;
55
54
  if (changes.isError)
@@ -64,24 +63,11 @@ function ChangesTab({ repo, colors }: { repo: string; colors: AgentColors }) {
64
63
  if (changes.data.changes.length === 0)
65
64
  return (
66
65
  <EmptyState
67
- variant="plain"
68
- title="Review changes here"
69
- description="Changes from separate working copies appear here, ready for you to review and combine."
70
- primaryAction={{
71
- label: "Open Code",
72
- onSelect: () => {
73
- go(
74
- href({
75
- page: "repo",
76
- repo,
77
- tab: "code",
78
- ref: null,
79
- path: "",
80
- file: null,
81
- }),
82
- );
83
- },
84
- }}
66
+ variant="panel"
67
+ className="mx-auto w-full max-w-[26rem]"
68
+ visual={<GitPullRequest aria-hidden="true" />}
69
+ title="No changes yet"
70
+ description="A change appears when an AI helper finishes work in its own working copy. You review it here, then combine it into main."
85
71
  />
86
72
  );
87
73
  return (
@@ -354,7 +340,7 @@ function RepoContent({ route, live }: { route: RepoRoute; live: LiveState }) {
354
340
  <section className="bonsai-main">
355
341
  {tab === "code" ? (
356
342
  <>
357
- <CodeTab route={route} detail={detail.data} />
343
+ <CodeTab route={route} detail={detail.data} colors={colors} />
358
344
  </>
359
345
  ) : null}
360
346
  {tab === "commits" ? (
@@ -460,7 +446,10 @@ export function CommitPage({ repo, hash }: { repo: string; hash: string }) {
460
446
  {agent ? (
461
447
  <AgentName name={agent} colors={colors} />
462
448
  ) : (
463
- actorLabel(commit.author.name)
449
+ actorLabel(
450
+ commit.author.name,
451
+ colors.get(commit.author.name)?.you,
452
+ )
464
453
  )}
465
454
  <span className="text-sm text-[var(--stipe-fg-muted)] bonsai-muted">
466
455
  {" "}
@@ -193,14 +193,15 @@ export function RepoNavigation({
193
193
  ))}
194
194
  </Select>
195
195
  </div>
196
- <div className="hidden max-w-sm md:block" ref={desktopClone}>
196
+ <div className="hidden max-w-lg md:block" ref={desktopClone}>
197
197
  <CopyField
198
198
  value={clone}
199
199
  fieldLabel="Clone repository"
200
200
  displayValue={detail.cloneUrl}
201
201
  />
202
202
  <p className="mt-1 text-sm text-[var(--stipe-fg-muted)]">
203
- Run from my-oyster.
203
+ Paste this into a terminal to copy the repository to your
204
+ computer.
204
205
  </p>
205
206
  </div>
206
207
  <div className="md:hidden">
@@ -231,7 +232,8 @@ export function RepoNavigation({
231
232
  displayValue={detail.cloneUrl}
232
233
  />
233
234
  <p className="mt-1 text-sm text-[var(--stipe-fg-muted)]">
234
- Run from my-oyster.
235
+ Paste this into a terminal to copy the repository to your
236
+ computer.
235
237
  </p>
236
238
  </div>
237
239
  </Popover>
package/web/views.tsx CHANGED
@@ -70,6 +70,14 @@ export function FileView({ path, text }: { path: string; text: string }) {
70
70
  );
71
71
  }
72
72
 
73
+ /**
74
+ * Syntax colors include red (headings, keywords), which reads as a removal on
75
+ * the green added-line row. Added lines show their text in the normal
76
+ * foreground so an addition reads as an addition.
77
+ */
78
+ const addedTextCSS =
79
+ '[data-line-type="change-addition"] [data-content] span, [data-line-type="change-addition"] span { color: inherit !important; }';
80
+
73
81
  export function DiffView({ file }: { file: FileDiff }) {
74
82
  const themeType = useThemeType();
75
83
  const oldFile = useMemo(
@@ -108,6 +116,7 @@ export function DiffView({ file }: { file: FileDiff }) {
108
116
  overflow: "scroll",
109
117
  themeType,
110
118
  theme: pierreTheme,
119
+ unsafeCSS: addedTextCSS,
111
120
  }}
112
121
  />
113
122
  </section>