fix(images): explain why Set category has nothing to set

Set category on a selection where no image is linked to a Library prompt
said only "None of the selected images has a linked prompt." It now says
why and what it means: "The selected images aren't in your Library yet,
so there is no prompt category to set." Unit and page-workflow tests
follow the copy.
This commit is contained in:
Vito Sansevero
2026-10-21 09:37:42 -07:00
parent 6b7f9e1fee
commit 38fc3ee236
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -1921,7 +1921,7 @@ test('Set category without a linked image posts nothing and opens no dialog', as
await page.route(categoryRoute, route => { posted += 1; return route.continue(); });
await checkbox(cards(page).last(), 'same.png').check();
await categoryButton(page).click();
await expect(toast(page)).toHaveText('None of the selected images has a linked prompt.');
await expect(toast(page)).toHaveText("The selected images aren't in your Library yet, so there is no prompt category to set.");
await expect(page.locator('dialog[open]')).toHaveCount(0);
expect(posted).toBe(0);
await expect(bulkbar(page).locator('.bulkbar > strong')).toHaveText('1 selected');
+1 -1
View File
@@ -33,7 +33,7 @@ test('the outcome toast counts the prompts and the skipped images', async () =>
test('the dialog and failure copy is the plan\'s', async () => {
const {CATEGORY_DIALOG, CATEGORY_NONE_LINKED, CATEGORY_FAILED} = await source;
assert.deepEqual(CATEGORY_DIALOG, {title:'Categorize selected images', label:'Category', action:'Apply'});
assert.equal(CATEGORY_NONE_LINKED, 'None of the selected images has a linked prompt.');
assert.equal(CATEGORY_NONE_LINKED, "The selected images aren't in your Library yet, so there is no prompt category to set.");
assert.equal(CATEGORY_FAILED, 'Category could not be set. Try again.');
assert.ok(Object.isFrozen(CATEGORY_DIALOG));
});
+1 -1
View File
@@ -5,7 +5,7 @@ import { countOf, noun } from './plural.mjs';
* filter matches the linked positive prompt's, so the action sets the category on those prompts.
*/
export const CATEGORY_DIALOG = Object.freeze({title:'Categorize selected images', label:'Category', action:'Apply'});
export const CATEGORY_NONE_LINKED = 'None of the selected images has a linked prompt.';
export const CATEGORY_NONE_LINKED = "The selected images aren't in your Library yet, so there is no prompt category to set.";
export const CATEGORY_FAILED = 'Category could not be set. Try again.';
// The server's limit (`validate_category`): the field stops there instead of failing on Apply.
export const CATEGORY_MAX_LENGTH = 100;