Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix: raise the LibraryPane header actions and create forms to the 44px touch floor (#3569)
[._.]/ Adam Eivy44d25fe5be42
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex 58b8556bc0..babe7eb1ab 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -196,3 +196,4 @@- **[issue-3567] The Writers Room live panels no longer hide what their buttons do — or how much daily budget is left — behind a mouse hover.** The CD Bridge, Live Director and Live Render headers each printed a bare "12 / 20 left today" whose meaning (which budget? shared with what?) lived only in a `title` tooltip, and the Propose / Suggest / Render / Send actions explained themselves the same way. A touch screen fires no hover, so on a phone none of it existed. The three readouts are now one shared badge that names its budget in visible text — and turns amber, then red with a warning icon and the UTC-midnight reset time, as the allowance runs down, so a spent budget stops looking identical to a full one. Each action carries the sentence as an explicit accessible name, prefixed with the words actually printed on the button so voice control can still reach it, and the two actions whose description had nowhere else to live (Send to Creative Director, Render scene) also print it as visible helper text. The five buttons involved were bare 18px-tall glyph rows; they now clear the same 44px tap-target floor as the rest of the app, and the headers wrap onto a second line instead of squeezing at phone widths — so, unlike the list rows in #3565, the header buttons take the extra height rather than clawing it back with a negative margin that would collide with the wrapped line above them.- **[issue-3566] The Writers Room synced review no longer hides its Script and Media panes on a phone.** The three panes were laid out as a grid that only ever split into columns at desktop widths; below that they stacked into one column inside a fixed-height, `overflow-hidden` container with nothing to scroll, so on a ~375px screen the Prose pane filled the view and Script and Media sat past the bottom edge, unreachable — the cross-link highlighting the panel exists for was invisible on half of it. Narrow widths now show one pane at a time, picked from a 44px-tall selector that replaces the desktop "which panes sit side by side" toggles in the same spot on the toolbar; each pane keeps its own scroller, so selecting a prose segment still scrolls the linked scene into view when you switch to it. Picking a pane on the phone selector also re-enables it, so a pane switched off on a desktop session isn't stranded, and if the pane you were viewing is switched off the view falls back to one that's still on rather than going blank. Desktop layout is unchanged.- **[issue-3586] The Writers Room synced review now shows which card you actually clicked.** All three panes drew their cards through a helper that had four states — selected, linked, dimmed, plain — but every caller passed "not selected" as a constant, so the strongest of the four was unreachable code. Because the mapping deliberately includes the selected item in its own pane's highlight set, the card you clicked came out styled exactly like the cards it links to: with a prose segment selected, the segment itself and the scene it maps to were the same faint accent border, and nothing on screen said which end of the cross-link you were standing on. The real selection is now threaded into each pane, so the anchor card takes the full accent ring and its linked counterparts keep the lighter treatment, in the prose, script and media panes alike.+- **[issue-3569] The Writers Room library's header buttons are now big enough to hit on a phone.** "New folder", "New work" and "Hide library" each wrapped a 14px icon in nothing but `p-1`, giving them roughly 22x22px of tappable area sitting side by side in a 260px sidebar — close enough together that a thumb aiming for "New work" landed on "New folder" instead, which is the one control the whole pane exists to reach. All three now clear the 44px floor the rest of the app uses, as do the create-folder and create-work forms they open: the name/title inputs, the kind dropdown, and the Add/Create/Cancel buttons were all ~24px tall, so getting past the header only landed you on a second row of targets just as easy to miss. Unlike the bible and snapshot rows in #3565, the header row has no padding of its own for the extra height to bleed back into, so it grows to 44px rather than clawing it back with a negative margin that would collide with the pane's top edge. "Hide library" stays desktop-only and is centred with `inline-flex` rather than `flex`, since the two are the same Tailwind layer and a bare `flex` would race the `md:` variant that hides it.diff --git a/client/src/components/writers-room/LibraryPane.jsx b/client/src/components/writers-room/LibraryPane.jsxindex ce911b8310..9ce5438de7 100644--- a/client/src/components/writers-room/LibraryPane.jsx+++ b/client/src/components/writers-room/LibraryPane.jsx@@ -128,10 +128,15 @@ export default function LibraryPane({ folders, works, activeWorkId, onSelectWork<div className="space-y-4 text-sm"><div className="flex items-center justify-between"><h2 className="text-xs uppercase text-gray-400 tracking-wider">Library</h2>+ {/* The three header actions wrap 14px icons, so they need an explicit+ 44px floor to be tappable — the same treatment the row-level actions+ below already carry. The row has no padding of its own to bleed the+ extra height back into (unlike the bible/snapshot rows in #3565), so+ it grows to 44px rather than clawing it back with a negative margin. */}<div className="flex items-center gap-1"><buttononClick={() => { setCreatingFolder(true); setCreatingWork(null); }}- className="p-1 text-gray-400 hover:text-port-accent"+ className="flex items-center justify-center min-w-[44px] min-h-[44px] text-gray-400 hover:text-port-accent"title="New folder"aria-label="New folder">@@ -139,7 +144,7 @@ export default function LibraryPane({ folders, works, activeWorkId, onSelectWork</button><buttononClick={() => { setCreatingWork('unfiled'); setCreatingFolder(false); }}- className="p-1 text-gray-400 hover:text-port-accent"+ className="flex items-center justify-center min-w-[44px] min-h-[44px] text-gray-400 hover:text-port-accent"title="New work"aria-label="New work">@@ -148,7 +153,7 @@ export default function LibraryPane({ folders, works, activeWorkId, onSelectWork{onCollapse && (<buttononClick={onCollapse}- className="hidden md:inline-flex p-1 text-gray-400 hover:text-white"+ className="hidden md:inline-flex items-center justify-center min-w-[44px] min-h-[44px] text-gray-400 hover:text-white"title="Hide library"aria-label="Hide library">@@ -165,12 +170,12 @@ export default function LibraryPane({ folders, works, activeWorkId, onSelectWorkvalue={folderName}onChange={(e) => setFolderName(e.target.value)}placeholder="Folder name"- className="w-full bg-port-bg border border-port-border rounded px-2 py-1 text-xs min-w-0"+ className="w-full bg-port-bg border border-port-border rounded px-2 py-1 text-xs min-w-0 min-h-[44px]"/><div className="flex items-center gap-1">- <button type="submit" className="text-xs px-2 py-1 bg-port-accent text-white rounded flex-1">Add</button>+ <button type="submit" className="text-xs px-2 py-1 bg-port-accent text-white rounded flex-1 min-h-[44px]">Add</button><button type="button" onClick={() => { setCreatingFolder(false); setFolderName(''); }}- className="text-xs px-2 py-1 text-gray-400">Cancel</button>+ className="text-xs px-2 py-1 text-gray-400 min-w-[44px] min-h-[44px]">Cancel</button></div></form>)}@@ -182,18 +187,18 @@ export default function LibraryPane({ folders, works, activeWorkId, onSelectWorkvalue={workTitle}onChange={(e) => setWorkTitle(e.target.value)}placeholder="Title"- className="w-full bg-port-bg border border-port-border rounded px-2 py-1 text-xs"+ className="w-full bg-port-bg border border-port-border rounded px-2 py-1 text-xs min-h-[44px]"/><selectvalue={workKind}onChange={(e) => setWorkKind(e.target.value)}- className="w-full bg-port-bg border border-port-border rounded px-2 py-1 text-xs"+ className="w-full bg-port-bg border border-port-border rounded px-2 py-1 text-xs min-h-[44px]">{Object.entries(KIND_LABELS).map(([k, l]) => <option key={k} value={k}>{l}</option>)}</select><div className="flex items-center gap-1">- <button type="submit" className="text-xs px-2 py-1 bg-port-accent text-white rounded flex-1">Create</button>- <button type="button" onClick={() => setCreatingWork(null)} className="text-xs px-2 py-1 text-gray-400">Cancel</button>+ <button type="submit" className="text-xs px-2 py-1 bg-port-accent text-white rounded flex-1 min-h-[44px]">Create</button>+ <button type="button" onClick={() => setCreatingWork(null)} className="text-xs px-2 py-1 text-gray-400 min-w-[44px] min-h-[44px]">Cancel</button></div></form>)}diff --git a/client/src/components/writers-room/LibraryPane.test.jsx b/client/src/components/writers-room/LibraryPane.test.jsxnew file mode 100644index 0000000000..cd8c232475--- /dev/null+++ b/client/src/components/writers-room/LibraryPane.test.jsx@@ -0,0 +1,79 @@+import { describe, it, expect, vi } from 'vitest';+import { render, screen, fireEvent } from '@testing-library/react';++// Regression guard for #3569: the Writers Room library header actions wrapped+// 14px icons in `p-1`, giving them ~22x22px of tappable area — small enough+// that a thumb aiming for "New work" on a phone regularly missed. The row-level+// actions in the same pane already carried the 44px floor; the header ones and+// the create forms they open now do too.++vi.mock('../../services/apiWritersRoom', () => ({+ createWritersRoomFolder: vi.fn(),+ deleteWritersRoomFolder: vi.fn(),+ createWritersRoomWork: vi.fn(),+ deleteWritersRoomWork: vi.fn(),+ updateWritersRoomWork: vi.fn(),+}));++import LibraryPane from './LibraryPane';++const renderPane = (props = {}) => render(+ <LibraryPane+ folders={[]}+ works={[]}+ activeWorkId={null}+ onSelectWork={() => {}}+ onRefresh={() => {}}+ onCollapse={() => {}}+ {...props}+ />,+);++// Tailwind arbitrary-value floors are what the rest of the app uses (see+// Drawer.jsx's close button), so assert on the classes rather than on computed+// layout — jsdom applies no stylesheet.+const expectTouchTarget = (el) => {+ expect(el.className).toContain('min-w-[44px]');+ expect(el.className).toContain('min-h-[44px]');+};++describe('LibraryPane header actions (#3569)', () => {+ it('meets the 44px touch floor on New folder, New work and Hide library', () => {+ renderPane();+ for (const name of ['New folder', 'New work', 'Hide library']) {+ expectTouchTarget(screen.getByRole('button', { name }));+ }+ });++ it('keeps the Hide library button desktop-only without losing its flex centering', () => {+ renderPane();+ const hide = screen.getByRole('button', { name: 'Hide library' });+ // `hidden md:inline-flex` and a bare `flex` are the same Tailwind layer, so+ // adding `flex` here would race the responsive variant rather than compose+ // with it — the icon must be centred by `inline-flex` instead.+ expect(hide.className).toContain('hidden md:inline-flex');+ expect(hide.className).not.toMatch(/(^|\s)flex(\s|$)/);+ });++ it('omits the Hide library button entirely when the pane cannot collapse', () => {+ renderPane({ onCollapse: undefined });+ expect(screen.queryByRole('button', { name: 'Hide library' })).toBeNull();+ });++ it('gives the new-folder form tappable controls', () => {+ renderPane();+ fireEvent.click(screen.getByRole('button', { name: 'New folder' }));+ expect(screen.getByPlaceholderText('Folder name').className).toContain('min-h-[44px]');+ expect(screen.getByRole('button', { name: 'Add' }).className).toContain('min-h-[44px]');+ expectTouchTarget(screen.getByRole('button', { name: 'Cancel' }));+ });++ it('gives the new-work form tappable controls', () => {+ renderPane();+ fireEvent.click(screen.getByRole('button', { name: 'New work' }));+ expect(screen.getByPlaceholderText('Title').className).toContain('min-h-[44px]');+ expect(screen.getByRole('combobox').className).toContain('min-h-[44px]');+ expect(screen.getByRole('button', { name: 'Create' }).className).toContain('min-h-[44px]');+ expectTouchTarget(screen.getByRole('button', { name: 'Cancel' }));+ });+});