Commit Graph
4 Commits
Author SHA1 Message Date
Cato 22da232484 test(dispatch): isolate remote checkout path 2026-11-17 14:20:02 +01:00
CatoandClaude 7f8e731b08 feat(ux): say it on the first screen; a shorter homepage; a header that stays (#1675)
* feat(fields): sixteen text boxes get the microphone; chatkit 0.25

Fleet experience standard, step 9. The experience audit counted 34 hand-made
text areas with no microphone; it now counts 17, and package-plan.json sets
the ceiling at today's counts so the number can only fall.

- @bitbaum/chatkit 0.22.1 -> 0.25.0. Composer behaviour and the class names
  Loki overrides are unchanged; LOKI_VOICE keeps the transcribe route's own
  sentence (showServerDetail), which names the fix.
- <TextArea> (components/ui/text-area.tsx): Loki's one adapter over chatkit's
  DictationField, drawn to match ui-input. Sixteen files use it. One file is
  exempt with its reason on its first line (URL paths, one per line).
- Field takes htmlFor, so its label names the control and a press on it
  focuses the field.
- A signed-out visitor's microphone is the browser's own recogniser
  (VISITOR_VOICE): the server leg answers 401 without a session, so on
  /change the mic recorded a whole take and then failed.
- The widget chat bundle budget goes 40 -> 41 KB: 41,414 -> 41,614 bytes
  gzipped, the two new dictation problems a person can act on.

The other seventeen wait for props the shared field gains in
bitbaum/chatkit#85 (autoFocus, onKeyDown, onBlur/onFocus, name, inputProps).

The stylesheet in this commit also carries the public-site rules of the
next one.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmsyW2aAn78GgfRxyn5

* feat(public): say it on the first screen; a shorter homepage; a header that stays

The way in
- The homepage's one action is the shared composer. What a signed-out
  visitor says is kept in the tab (lib/first-words), shown back on sign-up
  and handed to the new-project form at the end of onboarding or sign-in.
  With a sentence carried, onboarding does not ask for a project name, a
  folder and a GitHub address first.

The homepage
- 10.66 -> 7.48 phone screens at 390x844, 6.6 -> 5.11 at 1440x900.
- Three figures for the three steps, drawn in tokens (LoopFigure).
- Three problems on the homepage, all twelve on /why. Where it runs is one
  sentence and two links. The closing block is the shared FinalCta.
- One label for sign-up everywhere: Start a project.

Header, menu, footer
- The header was sticky in name only: .ui-public-surface was overflow:
  hidden, which made it the sticky container. overflow-x: clip.
- The phone menu takes focus, keeps Tab inside and hands focus back.
- The Product menu opens on a press, not on hover.
- Navigation and Sign in show from 1120px (was 1280px).
- A 2px focus ring, on the public surface and as the app-wide fallback.
- A skip link. Four footer groups instead of five.

Corners
- An unknown address outside the app drew the framework's bare 404 with no
  way back; the in-app one said Back to Today and went to Loki; the error
  page printed the raw error; the loading placeholder drew cards on pages
  that are rows. The share image leads with the headline.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmsyW2aAn78GgfRxyn5

* fix(ux): dates render once; rows say the part that matters; a person's words

- APP_LOCALE is a server variable, so a client component formatted dates in
  the default locale while the server used the configured one: a hydration
  error on /approvals with APP_LOCALE=de-CH. next.config.ts hands the same
  value to the browser as NEXT_PUBLIC_APP_LOCALE.
- Home's running rows lead with the live step. A phone row holds about
  thirty characters and every row read 'Next best step · Editing src/app/pa…'.
- The workbench's three rows on a phone were each cut before the words that
  say what the row is for.
- Terminal without cloud access, Home's first-run row and the widget row use
  the person's words (computer, Loki button), not ours (runner, widget).

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmsyW2aAn78GgfRxyn5

* docs(ux): the November UX pass, the public surface map, the changelog

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmsyW2aAn78GgfRxyn5

* feat(fields): the remaining text boxes get the microphone; chatkit 0.27

The second step of the fleet's experience standard for Loki. The shared
field gained what a form's text area needs in bitbaum/chatkit#85 (0.27.0):
autoFocus, onKeyDown, a submit key, a field-level blur, name, inputProps.
Sixteen more files move onto <TextArea>; the experience audit goes
bareTextareas 17 -> 1 and the ceiling in package-plan.json follows.

Kept, file by file: Cmd/Ctrl+Enter saves where Cmd+Enter did (goal and
person notes, project description, the idea step), Escape still cancels,
Enter still sends an interview answer and confirms a queued prompt, notes
still save when focus leaves the field, and an inline editor no longer
closes when its microphone is pressed. The studio's forms still read their
text by name from the native form. The scheduled job's prompt keeps the
mono face and spell-check off. ProjectBriefFill's separate Speak button is
the field's own microphone now (the same transcribe route).

Left: control/prompt-input.tsx, a prompt box with its own attachments and
paste-to-attach. It is a composer, not a form field.

Checked: tsc, lint, the design gate, file inputs, 599 unit-test files; in a
browser, autofocus, both submit keys, Escape, save on blur and not on the
microphone, 44px microphone and 16px text at 390, and the chat and Home
composers after the bump.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmsyW2aAn78GgfRxyn5

* test: a git fixture cannot reach the real repository from a hook in a linked worktree

A hook run from a linked worktree exports an absolute GIT_DIR, which
overrides git -C <sandbox>. dispatch-launch-dir.ts ran its fixture commands
with that environment, so a pre-push from a second worktree wrote a
test@test init commit onto the branch being pushed and set core.bare = true,
a test identity and a hooks path of /dev/null in the real config. Nothing
reached the remote; the repository was repaired by hand.

worktree-workspace.ts already clears those variables for itself. The unit
runner now clears them once for every test, and dispatch-launch-dir.ts does
so for a direct run. Checked: with a bogus GIT_DIR inherited, the test
passes and the real repository is untouched.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmsyW2aAn78GgfRxyn5

* docs(ux): the text boxes' second step, and what is left

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmsyW2aAn78GgfRxyn5

* chore(deps): chatkit 0.28.1, where a dictated take respects a field's maxLength

bitbaum/chatkit#87, found while reviewing this branch's converted fields.
0.28 also draws a visible border on the composer while it has keyboard
focus and stops thread-following from scrolling the page up.

Checked on 0.28.1: the chat, Home and homepage boxes at 390px in both
themes (text goes in, send enables, no sideways scroll, no console
errors), tsc, lint, the design gate and the widget size test (41 KB
budget holds).

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmsyW2aAn78GgfRxyn5

* refactor(ux): the text boxes and the chatkit raise leave this pull request

The staged rollout gate holds any pull request that raises a shared
package until both chatkit canaries serve that exact version. On
2026-11-12 kivvi and causius served chatkit 0.25.0, the gate could not
match kivvi's deployment receipt to its current commit, and this pull
request raised Loki from 0.22.1 to 0.28.1, so it could not merge.

Everything else in the pass needs no package change. This commit undoes
the three text-box commits (3bae0c40, b210b7c8, 1228a37d) and keeps what
they carried that is not about text boxes:

- the public styles for the homepage, the header, the footer, the skip
  link and the carried sentence (they were committed with the first
  sixteen text boxes);
- the visitor's microphone: the composer adapter takes voice="visitor"
  (the browser's own recogniser), used on the homepage and on /change,
  where the server leg answers a signed-out request with 401;
- the homepage box's shorter placeholder, which fits a 320px phone.

package.json, pnpm-lock.yaml and package-plan.json are main's again.
The write-up says where the text boxes are and what they wait for; the
changelog entry no longer announces them.

The text-box work is unchanged at 1228a37d and follows as its own pull
request.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmsyW2aAn78GgfRxyn5

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-12 13:33:44 +01:00
CatoandClaude b824a48686 fix(lanes): a lane starts clean: from main, in a new conversation, without touching the shared checkout (#1662)
* fix(lanes): a lane starts clean: from main, in a new conversation, without touching the shared checkout

A lane is a run beside the project's own session, in a worktree of the same
checkout on the cloud builder. A review of the merged runner fixes
(2026-11-12) found three ways it did not start clean:

- Its worktree was cut from the checkout's HEAD, which on the box is the
  shared session's run branch (loki/run-<id8>). The lane began with another
  run's unmerged commits and its pull request carried them. It now starts
  from the remote default branch (worktree-workspace laneBaseRef).
- Its checkout step ran git pull --ff-only in the folder the shared
  session's agent works in; the run branch tracks origin's default, so the
  live agent's files could move under it. A lane now only fetches
  (ensureBoxWorkspace pull: false).
- A dispatch that carried the project's sessionId kept it in a lane, so the
  lane ran claude --resume of the shared conversation in a new folder.
  A lane resumes nothing.

Also: a live lane reopened after a builder restart is looked for in its own
folder (pty-runtime's record), and traced back to its checkout for pruning,
not to the dispatch's laptop path.

scripts/test/lane-base.ts runs real git for each case. Runner 0.8.68.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtHxn2FxY2x8pJ83Xj

* fix(lanes): a lane that cannot start says why in words the retry policy reads

A laptop lane for a folder that is not on that machine was refused as a
worktree failure, and a missing box checkout as "nothing was launched".
auto-reimplement-policy reads neither as a workspace problem, so both were
retried on a builder where they cannot work. Both now use its words
("does not exist on this machine", "nothing was launched here").

Found by a review of the merged runner fixes (2026-11-12).

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtHxn2FxY2x8pJ83Xj

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-12 10:33:33 +01:00
CatoandClaude 1be367df36 fix(builder): a dispatch starts in the builder's own checkout, never the laptop path (#1638)
* fix(builder): a dispatch starts in the builder's own checkout, never the laptop path

A message to a busy project gets a parallel lane, tab <project>~<run>. On the
cloud builder the checkout was looked up under that tab name: no such project,
nothing to clone, and the stored laptop directory went on to the sandbox
("Sandbox cwd does not exist: /home/g/dev/orangecat", 2026-11-12). The run
died before the prompt arrived.

- dispatchLaunchDir: the project's checkout on this builder first, by project
  name, then the run's worktree of it. A lane without its own worktree, or a
  project the builder can neither find nor clone, is refused with the reason.
- launchAgentPty no longer hands on a directory that is not on the builder,
  and asks for the project's repository and token, not the lane's.
- /api/control/workspace-source answers for a lane tab as for its project.
- scripts/test/dispatch-launch-dir.ts pins it against the real checkout and
  worktree steps.

* chore(runner): 0.8.65 with its release note

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-12 05:37:08 +01:00