Skip to content

feat(desktop): Phase 3 profile, share, team baseline and install-to - #463

Merged
siracusa5 merged 8 commits into
mainfrom
ux/p3-profile-share
Nov 13, 2026
Merged

siracusa5 merged 8 commits into
mainfrom
ux/p3-profile-share

Conversation

@siracusa5

@siracusa5 siracusa5 commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

What

Phase 3 of the desktop UX spec (specs/ux-consolidation/spec.md, AC-22..AC-27).

  • Profile, no harness.yaml (AC-22): "Scan this machine" runs the machine import and shows the YAML for review before writing. "Start from a profile" and "Create from scratch" stay.
  • Profile, editing (AC-23): YAML editor and an editable panel side by side. Panel edits patch the YAML through the yaml Document API, so comments and indentation survive. A wrong-shaped section shows a note instead of crashing the page.
  • Compile (AC-24): a tab inside Profile, preview beside the form. /harness/sync redirects. Switching tabs keeps unsaved edits.
  • Share (AC-25): harness.yaml and agent prompt, each with Copy and Save file. New core buildProfileShare / buildProfilePrompt: the capture sanitizer plus a stricter share-only pass. New Rust save_share_file opens the Save dialog itself, so the page never names a path.
  • Team baseline (AC-26): when the selected project has a committed harness.yaml, Machine shows a "Team baseline" column ("required" / "missing here"). New core baselineCoverage; recommend() uses it, so the CLI's status --baseline and the column agree. "Missing here" rows offer cd <project> && … install && … compile.
  • Marketplace (AC-27): "Install to…" with a surface picker, the CLI command and an agent prompt, and Copy on the install command.

Review round

An independent review found Share leaking secrets in common shapes (URL userinfo/fragments, URLs outside url fields, KEY=value args, --github-token, --header, JSON in args, sk_live_ keys) and the Profile page crashing on wrong-shaped YAML. All fixed with tests; each share rule and desktop fix was mutation-checked (disable it, a test fails).

Adversarial review round

Two critics (Sonnet, Haiku) attacked the fix-round code. Verified and fixed:

  • Share scrubber rewritten as a per-token scanner: names judged by their last word (GITHUB_TOKEN yes, MAX_TOKENS no), values by shape. 23 further leak shapes and 10 false positives are now tests; each of its 22 rules is mutation-checked.

  • The agent prompt keeps every shared string (name, descriptions) inside the data fence and states the data rule first.

  • Save after a "re-read from disk" notice no longer overwrites the other writer's change.

  • Share, panel patches and YAML patching survive odd input (non-mapping roots, env: foo, CRLF, block scalars, stale list indexes).

  • Leaving Profile with unsaved edits no longer loses them: the draft is kept in memory and restored on return, with a dot on the Profile sidebar item. Quitting the app still loses an unsaved draft.

Not in this PR

  • Marketplace direct Apply is off. No surface has an in-app plugin installer driver (the Machine drawer can't run one either). Turning it on needs a new Rust command that runs processes.
  • Personal profile path still differs: CLI ~/.harness/harness.yaml, desktop ~/.claude/harness.yaml.
  • ${NAME} references compile unchanged; Cursor and Copilot expect ${env:NAME}.
  • Double blank lines in harness.yaml collapse to one after a panel edit (yaml library limit).

Verification

  • core 990, CLI 151, desktop 1184 unit tests; Rust lib 279; desktop e2e 62. Typecheck and capability coverage clean.
  • Every new screen screenshotted against mocks in light and dark.

Compare your output against specs/ux-consolidation/spec.md and list any requirements not addressed.

🤖 Generated with Claude Code

siracusa5 and others added 8 commits November 13, 2026 15:06
…ompt

buildProfileShare runs the capture sanitizer, then a stricter share-only pass
over every string (URL userinfo, query and fragment params anywhere, KEY=value,
header text, values after secret flags, JSON in strings, Stripe-style keys).
buildProfilePrompt has the recipient's agent save the file, set its variables,
and install and compile from the project the user names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
recommend() now takes its baseline gaps from it, so the desktop column and
harness-kit status --baseline share one matching rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The page supplies only the text, a name stem and the kind; the path always
comes from the user's pick. Size-capped, written atomically.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Profile: Scan this machine with review before writing; editor and editable
  panel side by side (comment-preserving YAML patches); Compile as a tab.
- Share sheet: harness.yaml and agent prompt, Copy and Save file.
- Machine: Team baseline column from the project's committed harness.yaml.
- Marketplace: Install to… with surface picker, CLI command and prompt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… shared text

Adversarial review found secrets surviving (inline --github-token=, header
text in prose, KEY=value with ; or &, strings holding a ${HARNESS_} reference,
github_pat_/npm_/glpat-/AIza keys, webhook path secrets, numbers and lists
under sensitive keys) and false positives (MAX_TOKENS=4096, git@ sources,
--key-file). Names are now judged by their last word, values by shape; each
secret gets its own variable; the prompt keeps every shared string inside the
data fence and states the data rule first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…patches survive odd input

- Save sends the digest of the text the buffer was synced with, so a disk
  version still waiting behind the dirty-buffer notice is refused, not lost.
- Share computes in a try/catch inside its own boundary; non-mapping roots
  disable it.
- Panel patches re-point list indexes at the current buffer or refuse.
- Discard clears the panel debounce; a failed Reload clears forceLoad;
  a second Cmd+S is ignored while saving.
- YAML patches keep CRLF, skip block-scalar text when inferring style, refuse
  a scalar root, and keep the header comment when the root empties.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The draft lives in a store that outlives the page, so going to another page
and back restores it; a disk change in between shows the existing notice and
Save keeps its conflict check. The Profile sidebar item shows a dot while a
draft exists. Also steadies the double-save test, which raced the digest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@siracusa5
siracusa5 merged commit 878e97a into main Nov 13, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant