Fold a CLI-created loop's name into one word - #280
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 --titletakes 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
GraphcodeKit/Sources/Domain/LoopName.swiftLoopName.folded— the CamelCase foldsanitizealready did, now shared.nilwhen nothing alphanumeric survives.CLI/GraphcodeCommand.swift--titleis folded at parse time.Sessions/RemoteGraphAccess.swiftDomain/SessionBriefing.swift--title <OneWordName>, never--title "Board Visibility".Clients/TitleSuggestionClient.swiftsanitizenow 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; newaTitleWrittenAsSeparateWordsIsFoldedIntoOneand 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