Repository navigation
New folder in the shared folder picker (desktop, iOS, Android) - #5252
DoodleBears wants to merge 2 commits into
Conversation
Refs #4935 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…older page Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pre-merge checks:
|
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Product Terms Follow The Glossary | The check fails on two product-noun uses in the PR description that match Avoid words in GLOSSARY.md. Other added copy passes. 1. Host, avoid "instance". The PR description says "Real isolated D… | Edit the PR description, not the code: 1. Replace "DSH Host (verify-app instance, …)" with "DSH Host (verify-app Host, …)" or another phrase that uses the term Host. 2. Replace "member-account UI session" with "Host Member UI sessio… |
|
| Touched Features Are Verified | Summary: Four feature files map to changed runtime files in this PR. The PR range is 3d569b9..4eb3d38 (the #5241 head is the base). Three of the four lack a named journey run or a stated reason for … |
For each of these features, either name a run of its journey or state a specific reason it was not run in the PR verification notes: - phone-sessions-navigation (new-session-screen.tsx): run the Sessions navigation journey on the shared d… |

Passed checks: 2 passed
-
Full details: Fix Targets The Root Cause
-
Explanation
The check applies only when the PR title starts with "fix". The contributor's title is "New folder in the shared folder picker (desktop, iOS, Android)", which does not start with "fix". The check is therefore inapplicable, and it passes by its own terms. The PR adds a feature (a New folder action in the folder picker). It does not fix a defect, so the root-cause criteria do not apply. No code inspection was needed to reach this result.
Full details: Consistent With Adrs And Existing Features
-
Explanation
The PR adds behaviour: a New folder action in the shared folder picker (iOS, Android, desktop). The check therefore applies. I found no failure condition. ADR contradiction: none found. - docs/adr/ holds ADRs 0353–0365. None covers folder creation, the folder picker or Workspace registration. The matches are unrelated (ADR-0356 grant write switch, ADR-0364 environment switching). - The closest decision text is docs/decisions/workspaces.md and docs/architecture/botharness-architecture.md ("Browsing creates no Workspace or Grant"). That sentence limits browsing. The PR adds an explicit create action, and the Grant still needs the existing confirmation step. I found no direct contradiction. The PR does not update that architecture line, so a reviewer may want to note the new create path there. - docs/decisions/team-mode.md gates creation through workspaces.createFolder. The PR uses that same permission. Reuse of existing modules (no second implementation of the core behaviour): - The Host call reuses createHostFolder in packages/host-client/src/bot-settings.ts (line 393). The PR does not add a new bridge method. - The picker reuses the existing FolderPickerSheet and WorkspaceSheet. The PR extends them. It does not add a second picker. - The permission gate uses the existing team viewer data (teamMode.viewer and the member permission refresh in apps/mobile/src/host/member-permissions.ts). Possible duplication, judged as acceptable: - packages/host-client/src/new-folder.ts (newFolderNameProblem) repeats the single-segment name rule already enforced by packages/core/src/workspaces/folder-create.ts (lines 89–99). The client copy omits the Windows reserved-name and character rules from the Host copy. This is a real drift risk. The Host stays authoritative. - The client copy is a pre-check only. host-client depends only on
@botharness/host-protocoland@tanstack/query-core. It cannot import packages/core, and core cannot run in the client. A shared package would be needed to reuse the rule. The PR does not add that. I do not treat this as a failing duplicate under the check wording. - canCreateFolders in new-folder.ts repeats owner-or-permission logic also found in canManage (packages/client/src/client/team-roles-bridge.ts, line 278). host-client cannot import the client package, so the copy is needed in this package. Result: no accepted ADR is contradicted, and the core behaviour reuses existing modules. The rule copies are noted above as a maintenance risk. They do not meet the FAIL condition.
-
Full details: Product Terms Follow The Glossary
-
Explanation
The check fails on two product-noun uses in the PR description that match Avoid words in GLOSSARY.md. Other added copy passes. 1. Host, avoid "instance". The PR description says "Real isolated DSH Host (
verify-appinstance, launched with an SSH marker …)". GLOSSARY.md defines Host as "The single DSH process that runs the plugin and every PersonaBot" and lists_Avoid_: server, instance, node, worker. Here "instance" names the same process that the sentence calls the Host. Preferred term: Host, for example "Real isolated DSH Host (verify-appHost, launched …)". 2. Host Member, avoid "account". The PR description says "Not run: … member-account UI session". GLOSSARY.md defines Host Member and lists_Avoid_: user, account, tenant, external person. Here "member-account" refers to a session signed in as a Host Member. Preferred term: Host Member (sign-in uses Member Credential), for example "member UI session signed in with a Member Credential". Checked and not violations: - Host Owner, Host Permission, Host Role: used with their glossary terms. No avoid words. - Bot: used as the visible UI name, which GLOSSARY.md and docs/agents/ui-copy.md both require. Not the bare lowercase "bot" that is avoided. - Workspace: "folder" is used for a Host directory. Workspace avoids only "project", "multi-root folder" and "group". The glossary's own Workspace root entry says "A Host folder". - Session: "新建会话" matches the existing zh UI copy (apps/mobile/src/features/sessions/strings.ts). GLOSSARY.zh.md does not list 会话 as an avoid word for Session. - Folder: the glossary's "folder" avoid applies to Channel sections, not Host directories. - Added user-visible strings and the changelog contain no avoid words for these nouns. The "Project" hits are test fixture folder names, not user copy. - "Projects" in the evidence filesystem path and "Mac account name" are a literal directory name and a macOS account. Neither uses a product noun in the glossary sense.Resolution
Edit the PR description, not the code: 1. Replace "DSH Host (
verify-appinstance, …)" with "DSH Host (verify-appHost, …)" or another phrase that uses the term Host. 2. Replace "member-account UI session" with "Host Member UI session" or "member UI session signed in with a Member Credential". After these edits, re-run the check. The rest of the added copy already passes.
Full details: Touched Features Are Verified
-
Explanation
Summary: Four feature files map to changed runtime files in this PR. The PR range is 3d569b9..4eb3d38 (the
#5241head is the base). Three of the four lack a named journey run or a stated reason for not running it. Mapped features and changed files (glob matches against## Sources): 1.workspace-grant.mdmatchespackages/client/src/client/workspace-grant*viaworkspace-grants-entry.tsx. This file adds the New folder button and form toFolderBrowser. The PR notes say "desktop Web Client drove grants with refusal and confirmation". That names a run of the grant authorization flow. It does not name the scripted journeyscripts/e2e-workspace-grant.mjsor its read and revoke steps. I treat this as a partial but acceptable run. 2.phone-sessions-navigation.mdmatchesapps/mobile/src/features/sessions/new-session-screen.tsx. This file adds thecreateFolderport anduseCreateFolder. The notes cover an iOS New Session run for folder creation. They do not name the feature's journey: Drawer/Stacked switching, On launch and Returning to Sessions landing, or the re-tap root check. No reason for skipping that journey is given. 3.phone-pairing.mdand 4.phone-multiple-hosts.mdboth matchapps/mobile/src/host/host-session.ts. This file addsmarkMemberClient(client)on member connections, which is runtime code. The notes do not name the pairing or two-Host journeys. The "Not run" list mentions a "member-account UI session", but it does not link that gap to either feature's journey. The iOS run needed a paired Host, but the notes do not present it as a pairing or multi-host run. The verification notes cover unit tests, lint, typecheck, and manual runs of the new picker. Those do not satisfy the check's requirement. The check requires a run of each touched feature's journey, or a reason it was not run. Features 2–4 do not meet that requirement. Onlyphone-sessions-navigation,phone-pairing, andphone-multiple-hostsneed a fix. Theworkspace-grantrun is partial but counts.Resolution
For each of these features, either name a run of its journey or state a specific reason it was not run in the PR verification notes: - phone-sessions-navigation (
new-session-screen.tsx): run the Sessions navigation journey on the shared device queue (Drawer/Stacked switch, On launch and Returning to Sessions landing, root re-tap), or record why it is not run. - phone-multiple-hosts (host-session.ts): run the shared-device two-Host journey, or record why it is not run. - phone-pairing (host-session.ts): run the pairing journey (for examplescripts/e2e-mobile-pairing-web.mjsor the shared-device pairing path), or record why it is not run. The member-connection path inmarkMemberClientshould be named explicitly. - Optional for workspace-grant: namescripts/e2e-workspace-grant.mjs, or state that the desktop grant run covers authorization only, with read and revoke not run.
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Why the change
Creating a Workspace folder needed a trip to a terminal or Finder; the folder picker now creates one in place, on every platform where it is used.
Issue / Discussion: Refs #4935 (UI half; the Host/CLI half is #5241, which this PR stacks on — together they cover the issue's acceptance criteria; retarget to
mainafter #5241 merges).Harness / Model
Harness: Claude Code
Model: claude-opus-5-5
Special things to note
FolderBrowser. Review focus:NewFolderPage/NewFolderForm, the permission hooks (useCreateFolderon both clients) andpackages/host-client/src/new-folder.ts.new-folder.test.ts10 ✓, mobilefolder-picker-new-folder.test.tsx10 ✓ andmember-folder-creation.test.tsx3 ✓, clientfolder-browser-new-folder.test.ts10 ✓; affected client + host-client suites 29 files / 361 tests ✓; mobile full suite 549 files ✓ with 6 pre-existing__DEV__ is not definedfailures that also fail on the Create and register Host folders within Team permissions #5241 base;pnpm lint, root and mobile typecheck ✓. Runtime — real isolated DSH Host: iOS Simulator drove all three entry points end to end (Workspaces registered, two Grants created, request card resolved), desktop Web Client drove grants with refusal and confirmation; Team role editor shows "Create folders in granted folders". Not run: Android (no SDK on this Mac), member-account UI session, AX5 navigation inside the picker list (see below), Human QA.plan testsjob pending at writing time; no new config, test directory or repo-file-reading test added.Change outline
New folder in the shared folder picker on iOS, Android and desktop. It creates one child of the folder being browsed through
createHostFolder(#5241), and the registered Workspace is selected right away.Who sees it: the Owner always; a member only with the
workspaces.createFolderHost Permission (mobile tracks it with the existing member permission refresh; desktop readsteamMode.viewer). The Host still enforces it.Evidence
Real isolated DSH Host (
verify-appinstance, launched with an SSH marker so DSH serves the in-app folder browser instead of the macOS chooser). iPhone 18 Pro Simulator (iOS 27.2) through T3 Device, Debug dev client, JS from this branch vs the #5241 head (3d569b96b). Fixture folders live in/tmp/tobs-qa. Black bars hide the "registered folders" rows (they include a path with the Mac account name). App locale is Chinese.iOS — New Session
Before New Session Light
Before New Session Dark
After Picker Light
After Picker Dark
After Created and selected Light
After Created and selected Dark
iOS — Bot Workspace grants
Before Bot Workspace grants Light
Before Bot Workspace grants Dark
After Picker Light
After Picker Dark
After Name Light
After Name Dark
After Selected → confirm Light
After Selected → confirm Dark
After: separator refused before the Host call · Light
iOS — Bot folder-request card
Before Bot folder-request card Light
Before Bot folder-request card Dark
After Picker Light
After Picker Dark
After Host refusal inline Light
After Host refusal inline Dark
After Selected → allow Light
After Selected → allow Dark
Canonical state after the iOS run (Host CLI /
/api):Desktop (Web Client)
Before desktop Light
Before desktop Dark
After desktop picker Light
After desktop picker Dark
After desktop name Light
After desktop name Dark
After desktop refusal Light
After desktop refusal Dark
After desktop selected Light
After desktop selected Dark
Team role editor renders the new permission from #5241:
checkbox "Create folders in granted folders"(ARIA of the New role dialog).Tests (written first)
Native QA not captured
create_new_folderMaterial Symbol drawable, generated byscripts/material-symbol-drawable.mjs). Needs a run on the Linux/Windows QA lane.TextField/SheetActions(actions stack at large text), but the picker's existing list area is only ~100pt tall and could not be scrolled through the driver — identical on Before, so AX5 is unverified here.🤖 Generated with Claude Code