The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.
TypeScript agentai-chatai-studioall-in-onecoding-agentdesktop-appfluximage-generationlinuxllmlocal-ailocal-llmopen-sourceprivacyself-hostedstable-diffusionuncensoreduncensored-aivideo-generationwindows
fix(character): a wide window keeps the names, and no entry of the row wraps alone
purple83f82b102bae
diff --git a/e2e/character-hub.spec.ts b/e2e/character-hub.spec.tsindex 31f03621..c34d9f2a 100644--- a/e2e/character-hub.spec.ts+++ b/e2e/character-hub.spec.ts@@ -218,7 +218,7 @@ test('one pill: the characters as tabs, the stage, and the row over the window s// The same window as on Image, at the same place, and the area over it// is a column of its width.await expectWindowAt(page, onImage)- const column = (await page.locator('.hub-column').boundingBox())!+ const column = (await page.locator('.hub-scroll').boundingBox())!expect(Math.abs(column.width - onImage.width)).toBeLessThanOrEqual(1)expect(Math.abs(column.x - onImage.x)).toBeLessThanOrEqual(1)await expect(page.locator('.hub-bar, [data-swap-bar]')).toHaveCount(0)diff --git a/src/components/create/experimental/__tests__/character-stage.test.tsx b/src/components/create/experimental/__tests__/character-stage.test.tsxindex d0e23246..4e749a94 100644--- a/src/components/create/experimental/__tests__/character-stage.test.tsx+++ b/src/components/create/experimental/__tests__/character-stage.test.tsx@@ -185,8 +185,9 @@ describe('one column, one window', () => {it('the area is as wide as the prompt window: 660, centred', () => {const block = hubCss()// Both sides equally wide at every width: the left keeps free what the rails take.- expect(block).toMatch(/\.lu-hub-row \{[^}]*grid-template-columns: minmax\(var\(--hub-rails, 16px\), 1fr\) minmax\(0, 660px\) minmax\(var\(--hub-rails, 16px\), 1fr\)/)- expect(block).toMatch(/\.lu-hub-row > \.hub-column \{[^}]*grid-column: 2/)+ expect(block).toMatch(/\.lu-hub-row > \.hub-column \{[^}]*align-items: center;[^}]*padding-inline: var\(--hub-rails, 16px\)/)+ expect(block).toMatch(/\.lu-hub-row > \.hub-column > \* \{[^}]*max-width: 660px/)+ expect(block).toMatch(/\.lu-hub \.hub-stage > \.hub-scroll \{[^}]*max-width: 660px/)// The stage is a plain column in it, not a grid across the page.expect(block).toMatch(/\.lu-hub \.hub-stage \{[^}]*flex-direction: column/)expect(block).not.toMatch(/grid-template-columns: minmax\(0, 210px\)/)@@ -225,7 +226,7 @@ describe('one middle axis', () => {it('the row of the characters stands around the middle, with New character as its last entry', () => {const block = hubCss()expect(block).toMatch(/\.lu-hub \.hub-tabs \{[^}]*justify-content: center/)- expect(block).toMatch(/\.lu-hub \.hub-tablist \{[^}]*justify-content: center/)+ expect(block).toMatch(/\.lu-hub \.hub-tablist \{[^}]*text-align: center;[^}]*text-wrap: balance/)const { container } = hub(<HubTabs list={chars(3)} loading={false} current="saved:0" photoOnly={false} onPick={() => {}} onPhotoOnly={() => {}} onNew={() => {}} />)const row = container.querySelector('[role=tablist]')!expect(row.lastElementChild!.getAttribute('data-hub-new')).not.toBeNull()@@ -236,6 +237,8 @@ describe('one middle axis', () => {expect(tabsFit(names(1), 'Mira', 660)).toBe('names')expect(tabsFit(names(3), 'Mira', 660)).toBe('names')expect(tabsFit(names(8), 'Mira', 660)).toBe('picked')+ // A wide window has room for all eight names.+ expect(tabsFit(names(8), 'Mira', 1000)).toBe('names')expect(tabsFit(names(8), 'Mira', 380)).toBe('pictures')expect(tabsFit(names(3), 'Mira', 300)).toBe('pictures')// No width measured yet: the row in full.diff --git a/src/components/create/experimental/hub/HubStage.tsx b/src/components/create/experimental/hub/HubStage.tsxindex d44f4dc3..26d0e9ef 100644--- a/src/components/create/experimental/hub/HubStage.tsx+++ b/src/components/create/experimental/hub/HubStage.tsx@@ -71,7 +71,7 @@ export function HubTabs({ list, loading, current, photoOnly, onPick, onPhotoOnlyconst fit = tabsFit(list.map((c) => c.name), picked?.name ?? null, width)const small = fit === 'pictures'return (- <div ref={row} className="hub-tabs hub-line border-b hub-fs-14" data-hub-tabs data-hub-tabs-fit={fit}>+ <div ref={row} className="hub-tabs hub-fs-14" data-hub-tabs data-hub-tabs-fit={fit}><div role="tablist" aria-label="My characters" className="hub-tablist">{list.map((c) => {const on = c.key === current@@ -188,9 +188,10 @@ function Card({ c, photo }: { c: HubCharacter | null; photo: string | null }) {<button type="button" className="hub-dim" onClick={() => setAsking(false)}>Keep</button></span>)}+ {/* The file of a LoRA character, in the same row: download, use on+ this computer, delete. */}+ {!saved && <span className="hub-card-file inline-flex"><CharacterMore bare /></span>}</div>- {/* The file of a LoRA character: download, use on this computer, delete. */}- {!saved && <div className="hub-card-file mt-1 flex justify-center"><CharacterMore bare /></div>}{error && <p role="alert" className="mt-1.5 text-red-500 hub-fs-125 dark:text-red-400">{error}</p>}{c.kind === 'local' && (<p className="hub-dim mt-1.5 hub-fs-125">In Chat, name it: “a picture of {c.ref?.name ?? c.name} at the beach”.</p>diff --git a/src/index.css b/src/index.cssindex d2684c41..d47668a6 100644--- a/src/index.css+++ b/src/index.css@@ -3215,12 +3215,17 @@ input[type="range"].neuron-range:disabled { cursor: not-allowed; opacity: 0.5; }column, and the rails of the gallery and the presets at the right. Bothsides are always equally wide (the left keeps free what the rails take,--hub-rails), so the column stands exactly over the window at every- width; with little room it gets narrower, it never leaves the middle. The stage in it: the tabs, the character as a head (a small+ width; with little room it gets narrower, it never leaves the middle.+ The row of the characters alone may use the whole room between the two+ sides, so a wide window shows more names. The stage in it: the tabs, the character as a head (a smallpicture, beside it the name and every action it has), then the inputs ofthe action and its photos, which scroll. Nothing here moves by itself. */-.lu-hub-row { display: grid; grid-template-columns: minmax(var(--hub-rails, 16px), 1fr) minmax(0, 660px) minmax(var(--hub-rails, 16px), 1fr); grid-template-rows: minmax(0, 1fr); }-.lu-hub-row > .hub-column { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }-.lu-hub-rails { grid-column: 3; grid-row: 1; justify-self: end; display: flex; min-width: 0; min-height: 0; padding-left: 16px; }+.lu-hub-row { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }+.lu-hub-row > .hub-column { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; align-items: center; min-width: 0; min-height: 0; overflow: hidden; padding-inline: var(--hub-rails, 16px); }+.lu-hub-row > .hub-column > * { width: 100%; max-width: 660px; }+.lu-hub-row > .hub-column > .hub-stage { max-width: none; align-items: center; }+.lu-hub .hub-stage > .hub-scroll { width: 100%; max-width: 660px; }+.lu-hub-rails { grid-column: 1; grid-row: 1; justify-self: end; position: relative; z-index: 1; display: flex; min-width: 0; min-height: 0; padding-left: 16px; }/* A phone-wide window: the area takes the whole width, as before. */@media (max-width: 520px) {.lu-hub-rails { display: none; }@@ -3229,12 +3234,13 @@ input[type="range"].neuron-range:disabled { cursor: not-allowed; opacity: 0.5; }/* Everything stands on the middle axis of the prompt window: the row ofthe characters around the middle, the head centred over the photos, thephotos as a centred grid. */-.lu-hub .hub-tabs { flex: none; display: flex; justify-content: center; min-height: 38px; }-.lu-hub .hub-tablist { display: flex; flex-wrap: wrap; align-items: stretch; justify-content: center; column-gap: 20px; min-width: 0; }-.lu-hub .hub-tab { display: inline-flex; align-items: center; gap: 7px; flex: none; min-height: 37px; white-space: nowrap; margin-bottom: -1px; border-bottom: 1.5px solid transparent; }+.lu-hub .hub-tabs { flex: none; display: flex; justify-content: center; width: 100%; min-height: 38px; }+/* Lines of the row are balanced: nothing wraps alone under the others. */+.lu-hub .hub-tablist { display: block; min-width: 0; text-align: center; text-wrap: balance; }+.lu-hub .hub-tab { display: inline-flex; align-items: center; gap: 7px; min-height: 37px; margin: 0 10px; vertical-align: top; white-space: nowrap; border-bottom: 1.5px solid transparent; }.lu-hub .hub-tab--on { border-bottom-color: var(--hub-text); }-.lu-hub .hub-tabs[data-hub-tabs-fit="pictures"] .hub-tablist { column-gap: 12px; }-.lu-hub .hub-scroll { flex: 1 1 0%; min-width: 0; min-height: 0; overflow-y: auto; }+.lu-hub .hub-tabs[data-hub-tabs-fit="pictures"] .hub-tab { margin: 0 6px; }+.lu-hub .hub-scroll { flex: 1 1 0%; min-width: 0; min-height: 0; overflow-y: auto; border-top: 1px solid var(--hub-sep); }.lu-hub .hub-card { display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 14px 0 12px; text-align: center; }.lu-hub .hub-card > .hub-portrait { width: 64px; margin-bottom: 8px; }.lu-hub .hub-body { min-width: 0; }