mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-15 10:59:32 +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
@@ -176,6 +176,7 @@ describe('PathPicker New folder', () => {
|
||||
it('is on for Link Existing and off for the other session-ui pickers', () => {
|
||||
const block = (name: string) => {
|
||||
const start = sessionUiJs.indexOf(`${name}() {`);
|
||||
expect(start, name).toBeGreaterThan(-1);
|
||||
return sessionUiJs.slice(start, sessionUiJs.indexOf('PathPicker.open', start) + 400);
|
||||
};
|
||||
expect(block('openLinkCasePathPicker')).toContain('allowNewFolder: true');
|
||||
|
||||
@@ -51,7 +51,8 @@ describe('POST /api/filesystem/mkdir', () => {
|
||||
try {
|
||||
const res = await mkdir({ path: casesDir, name: 'myproj' });
|
||||
expect(res.statusCode).toBe(400);
|
||||
expect(res.json().error).toContain('Add Case > New Case');
|
||||
expect(res.json().error).toContain('Pick a folder outside it');
|
||||
expect(res.json().error).toContain('Add Case > Create New (no custom folder)');
|
||||
expect(existsSync(join(casesDir, 'myproj'))).toBe(false);
|
||||
// A folder inside a case is fine.
|
||||
mkdirSync(join(casesDir, 'real-case'));
|
||||
|
||||
Reference in new issue
Block a user