mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-15 02:49:33 +01:00
fix(picker): word the cases-folder refusal for both pickers, and finish the review items
With the folder field empty, Create New's Browse opens in the cases folder, and New folder there answered "Use Add Case > New Case". There is no tab of that name (the label is Create New), and a Create New user is already on it. The refusal now reads right from Link Existing and from Create New's custom folder. Its test pin, the code comment, the manual, api-reference, CLAUDE.md and architecture-invariants move with it. The block() helper in the New folder picker test returned an empty string for a name that is not in session-ui.js, so .not.toContain passed and a renamed picker dropped out of the check. It now asserts the name was found. The manual's path picker list said two places and left out Create New, which the New folder paragraph names. It now lists every Browse that opens the picker, and that paragraph is rewrapped to the page's width. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ae0de7a1ec
commit
dbb3202161
7 files changed
+22
-14
No files matched your search
@@ -1480,7 +1480,9 @@ export function registerFileRoutes(app: FastifyInstance, ctx: SessionPort & Even
|
||||
}
|
||||
// The cases directories (shared, and the caller's own in multi-user mode) are what GET /api/cases lists as
|
||||
// local cases: a folder made there is a case with no scaffold, which Link then refuses by name and which
|
||||
// deleting would take the linked folder with. A case there is made through Add Case > New Case.
|
||||
// deleting would take the linked folder with. A case there is made through Add Case > Create New with no
|
||||
// custom folder. The refusal has to read right from both pickers that offer New folder: a Create New user
|
||||
// is already on that tab, with the custom folder ticked.
|
||||
const casesDirs = await Promise.all(
|
||||
[...new Set([CASES_DIR, resolveCasesDir(getAuthUser(req))])].map((dir) =>
|
||||
fs.realpath(dir).catch(() => resolve(dir))
|
||||
@@ -1490,7 +1492,7 @@ export function registerFileRoutes(app: FastifyInstance, ctx: SessionPort & Even
|
||||
reply.code(400);
|
||||
return createErrorResponse(
|
||||
ApiErrorCode.INVALID_INPUT,
|
||||
'This is a cases folder: every folder in it is a case. Use Add Case > New Case to make one there.'
|
||||
'This is a cases folder: every folder in it is a case. Pick a folder outside it, or make the case with Add Case > Create New (no custom folder).'
|
||||
);
|
||||
}
|
||||
// Like browse, a file is not a place to create in.
|
||||
|
||||
Reference in new issue
Block a user