Skip to content

Fold a CLI-created loop's name into one word - #280

Merged
scgopi merged 1 commit into
mainfrom
fix/cli-one-word-titles
Sep 4, 2026
Merged

Fold a CLI-created loop's name into one word#280
scgopi merged 1 commit into
mainfrom
fix/cli-one-word-titles

Conversation

@scgopi

@scgopi scgopi commented Sep 4, 2026

Copy link
Copy Markdown
Owner

The gap

PR #266 taught the backend namer to answer in a single word; PR #267 folded the two names the app writes itself ("NewLoop", "Triage2"). The third way a loop gets named was left alone: graphcode node create --title takes whatever it is handed and passes it straight into the draft. A session fanning work out writes the phrase it would say out loud, so the canvas keeps filling with "Board Visibility".

The fix

Where Change
GraphcodeKit/Sources/Domain/LoopName.swift New LoopName.folded — the CamelCase fold sanitize already did, now shared. nil when nothing alphanumeric survives.
CLI/GraphcodeCommand.swift --title is folded at parse time.
Sessions/RemoteGraphAccess.swift The remote Python shim builds its own draft, so it folds too.
Domain/SessionBriefing.swift Asks for the shape in the flag: --title <OneWordName>, never --title "Board Visibility".
Clients/TitleSuggestionClient.swift sanitize now calls the shared fold; behaviour unchanged.

The app's creation form is deliberately untouched — a human typing two words into a field means them.

Verification

  • xcodebuild -scheme graphcode test: 1560 tests in 162 suites, passed; new aTitleWrittenAsSeparateWordsIsFoldedIntoOne and the updated shim test ran.
  • -scheme graphcode-cli build: clean.
  • swiftlint lint: 0 errors. swift format lint --strict: clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GyN8GTgxCHYEnjKohEHps5

PR #266 taught the backend namer to answer in a single word and #267 folded
the two names the app writes itself, but the third way a loop gets named was
left alone: `graphcode node create --title` takes whatever it is handed. Every
loop a session fans out came back onto the canvas as "Board Visibility" — the
briefing asks for a title, a session writes the phrase it would say out loud,
and an instruction is all telling can ever be.

The fold `sanitize` already did moves into `LoopName.folded`, and the CLI
applies it at the boundary — the Swift parser and the remote Python shim both,
since each builds its own draft. The briefing now asks for the shape it wants
in the flag itself. A name with nothing alphanumeric in it is kept as typed
rather than dropped, so no path can end up with a nameless card.

The app's creation form is deliberately untouched: a human typing two words
into a field means them.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GyN8GTgxCHYEnjKohEHps5
@scgopi
scgopi merged commit 74730fe into main Sep 4, 2026
1 check passed
@scgopi
scgopi deleted the fix/cli-one-word-titles branch September 4, 2026 15:03
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