Codebase: remove routes, buttons and members nothing reaches, and the checks that still assert them
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 22/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Active
- Domain
- desktop, documentation, tooling
Research direction
Start with the three groups in the issue, beginning with the unreachable .home case in Attention.swift and the Not now buttons in docs/surfaces.json, then the dead symbols in StageKitController and PrivatePackKit. Confirm each name has no references with grep -rnw, delete it, and rerun scripts/check-surfaces.py and scripts/test-check-surfaces.py. Done means the listed suites pass on a native macOS build with no new warnings, and the toolbar gallery changes only for activity-personas.
Written by the indexing model from the issue text.
Description
Outcome: the contract, the registry and the checks describe only what people can reach. Contributors and agents stop finding passing checks for surfaces that no longer exist. Nothing changes for users except one toolbar gallery render, which gains the accessory the app already shows.
Land this after the 15 October train ships. Rebase it last over any branch that edits AppModel, WorkbenchHome, StageKitController or the toolbar files.
1. Home's 'Open Home…' route and two Not now buttons that never render
Evidence (train head 14d06bc)
Attention.swift:10-11and:19define.home, but nothing raises it.report(…, on:)uses only.dictateand.history(AppModel.swift:249-1338,Views.swift:341,:627). The last.homeraise was removed in 7cd3b0a (7 Oct).- So
WorkbenchHome.swift:808-812is unreachable. - Three places still describe a door and a button that never appear:
docs/workbench.md:205('Open Home… when the speech model could not be prepared, beside Retry model'), the gallery's door inventory (SurfaceGallery.swift:4461) andWorkbenchPageChecks.swift:90. The panel actually sends a not-ready model to Models (WorkbenchQuickPanel.swift:145). ModelSettingsView.onNotNow(:8-10,:80) is never passed; its only caller isWorkbenchHome.swift:338.FounderIntroductionCardis built only withcanDismiss: false(WorkbenchHome.swift:403), so its Not now (FounderIntroduction.swift:89) anddismiss()never run.WorkbenchHomePage.introduction(:557) is never read.- Both Not now buttons are registered (
docs/surfaces.json:472-476,:5400-5406).
Change
- Remove
case homeand delete:808-812. - Drop the gallery row at
SurfaceGallery.swift:4461, and reword:4462to 'Open Models…, while speech is not ready, preparing or could not be prepared'. - Remove the
.hometuple from WorkbenchPageChecks,onNotNow, FounderIntroduction's dismissal state and button, andWorkbenchHomePage.introduction. - In
docs/surfaces.json, edit by hand (not --update):- delete the two entries;
- retarget the
aliasOfof the live Home Not now (:5447) toLocalVoice.MeetingWorkspaceView.MeetingOfferPanelController.Button.not-now. Without this, check-surfaces fails with 'Invalid aliasOf'.
- Change
docs/workbench.md:205to 'Open Models… while speech is not ready: not downloaded, preparing or could not be prepared'.
2. Declarations nothing references
Evidence. grep -rnw over Sources, Tests and scripts finds only each declaration.
- StageKitController:
hasOverlaySession,areOverlaysPausedandcanStepOverlays(:478-480; the first two duplicate:450-451),showBoard(:535),stepOverlaySetandtoggleOverlayVisibility(:543-544),performShortcut(:546-549), andquickControlsView(:417).escape()is live (main.swift:211,:282,:708); keep it. - ServiceNow install:
ReadbackModel.installServiceNowPack(:782-788) wrapsReadbackResources.installServiceNow(:177-180), which always throws, so its success line can never show. - AppModel:
captureOutputModeLabelandcaptureShortcutInstruction(:61-62, written at:619-622) andcaptureDestinationName(:64) are published and never read. - PrivatePackKit:
maximumPointerBytesandmaximumCachedFiles(PackPrimitives.swift:23,:27) are enforced nowhere, although:4says every bound is.maximumRetainedRevisions(:25) is unused becausePackStore.swift:228hard-codesprefix(3).GitHubPackClient.jsonAccept(:38) is unused becauseGitHubPackAuthorization.swift:75repeats the literal.
- Strays:
chooserOffscreenForChecks(CapturePanel.swift:241),sourceReference(SnapStore.swift:115),claudeImagesVerified(SubscriptionCLI.swift:1262),bundledDeckIdentifiers(TranscriptHandoff.swift:92) andisUsable(ToolbarViewState.swift:67).
Change
- Delete them.
- Use
prefix(PackLimits.maximumRetainedRevisions)andGitHubPackClient.jsonAcceptin place of the literals. Both are the same values, so behaviour doesn't change. - Keep
uninstallServiceNowPackandCaptureSettings.outputLabel, which checks use.
3. Leftovers from the removed More menu and Appearance accessory
Evidence
- 4355a71 removed the toolbar's overflow menu (
docs/floating-toolbar.md:106). - These are now used only by checks or tests:
ToolbarActiveWorkandToolbarAccessoryMenus(FloatingToolbarState.swift:23-95), asserted atWorkbenchControlChecks.swift:239-259and:316-356(for example, 'a hidden card's Appearance waits in More');StageKitController.PersonaShape,personaShape(of:),isPersonaCopyHidden,personaMenuHoldsAppearanceandsetPersonaShape(:267-295), used inPersonaAppearanceTests.swift:444-560;ToolbarAccessory.appearanceDescription(ToolbarViewState.swift:164);HomePersonaControl.tileVerb(WorkbenchControlTool.swift:249), which Home never shows;CapturePanel.rowSize(:90).
- Gallery mismatch. In the app, Persona mode returns at
FloatingToolbar.swift:179and shows the set picker. ToolbarCore's copy of the rule returns nil for.session(ToolbarViewState.swift:172-181). So the toolbar gallery's activity-personas render (ToolbarGallery.swift:102) draws no accessory where the app shows Choose set.
Change
- Delete those symbols.
offered(for:)drops itsselectedPersonaCopyparameter and returns.personaPickerfor.session. Update every caller:FloatingToolbar.swift:180,ToolbarGallery.swift:25and:70,SurfaceGallery.swift:4151,ToolbarNativeTests.swift:315,:342,:412and:453, andToolbarGalleryTests.swift:154-189.- Retarget PersonaAppearanceTests to
selectedLiveCopy,liveShape(of:)andsetLiveShape. Keep its Appearance-menu assertions through a small local helper. - Delete
PersonaLibrary.liveCopyHiddenif nothing else uses it afterwards. - Delete the
ToolbarAccessoryMenusscan line atscripts/check-surfaces.py:144-145; otherwise check-surfaces reports the owner missing. - Reword the stale 'waits in More' comments.
- Keep
PersonaCopyandselectedPersonaCopy, whichToolbarActivityActions.swift:80-82uses.
Acceptance
- A release build has no new warnings.
swift test(ToolbarCore, ToolbarKit and PrivatePackKit),bash scripts/test-stage.sh --ci,--check-core,--check-floating-toolbarand--check-readback-packpass.python3 scripts/check-surfaces.pyreports 686 entries (688 today), andscripts/test-check-surfaces.pypasses.grep -rnwreturns nothing for each deleted name, andgrep 'Open Home…' docs/workbench.md Sourcesreturns nothing.- Toolbar gallery renders are identical, except activity-personas, which gains Choose set.
Value before scope
- Outcome: no misleading contract line, registry entry or passing check for a surface nobody can open.
- Simpler route: deletion, plus two same-value substitutions.
- Owner: as listed.
- Complexity: a few hundred fewer lines.
- Verified by: the compiler and the existing suites.
Grammar: Codebase.
Refs #279
Build-ready record from the 15 Oct round-three pass (delight and code-base value), verified against the release train head 14d06bc by an independent skeptic per item. Closes only after native acceptance.
- Dominant language
- Swift
- Stars
- 0
- Forks
- 1
- Avg merge
- 8h 5m
- Merged PRs (30d)
- 215
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Ship-Work/workbench
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
documentation good first issue help wanted
Difficulty 2/5 Half a day Newbie friendliness 74/100
Ship-Work/workbench#29 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
Maintainers usually reply within 1 day
All issues in Ship-Work/workbench
Similar issues
-
ace documentation
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
githubnext/desktop-tools#104 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
type: cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
googleapis/google-cloud-swift#1477 ·
Maintainers usually reply within 1 day
-
product / auth product / console product / databases product / messaging product / self-hosted product / sites product / storage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
P1 status: first-line-handled status: needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
a2ui-project/a2ui#3282 · 1 comment ·
Maintainers usually reply within 2 days