Skip to content

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

fix: raise Writers Room bible/polish/storyboard action buttons to the 44px touch-target floor (#3565)

[._.]/ Adam Eivy280afc56542f
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index dff0449bb4..3c7dad2b4c 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -190,3 +190,4 @@
- **The Daily Log's first note into a new Obsidian folder no longer silently fails to write.** Mirroring a record into a vault tried to update the note first and only created it if the update reported the note missing — but a note whose *folder* does not exist yet cannot be containment-checked at all: the path can't be resolved, so it falls back to the raw path, which fails the check against the realpath'd vault root whenever the vault is reached through a symlink. On macOS that is any vault under a `/var`-rooted path, and more generally any vault behind a symlinked home or mount. The update therefore reported "invalid path" rather than "not found", the create fallback never ran, and the day was never mirrored. Creating first and updating only on "already exists" sidesteps it entirely — the folder is ensured before the path is resolved. The two vault mirrors (Daily Log and the new YouTube transcript) now share one `upsertNote` in the Obsidian adapter instead of each carrying its own copy of that ordering rule, and it is tested against a real vault on disk rather than against stubbed calls, which is how the failure surfaced in the first place.
- **[issue-3578] Image-to-3D renders no longer stall the progress bar on a stage banner that lands across two chunks.** The shared generate driver split each `data` chunk from the generator on its own, with nothing carried between them — but a child process hands out its output on arbitrary byte boundaries, so a banner like "Baking textures at 2048px" could arrive as two halves, neither of which matched any stage signature. The percent then sat where the previous banner left it until the next one happened to land whole, which on the long sampling phase reads as a hung render. Both lanes now feed their output through the same buffered line reader the rest of the app's subprocess streams use, which stitches the partial line back together and flushes whatever is left when the child exits — so a generator that writes its final "Saved:" line without a trailing newline still has its asset path read. stdout and stderr keep separate buffers, since a shared one would splice a partial line from one stream onto a chunk from the other. Tqdm's carriage-return redraws still surface as individual frames, and the raw output kept for classifying a non-zero exit is unchanged, so an out-of-memory or gated-model failure is still named the same way.
+- **[issue-3565] Three Writers Room controls are now big enough to hit on a phone.** The Edit pencil on every Cast/Places/Objects bible row was an 11px icon with no padding around it — an ~11x11px tap target sitting next to the row text, so a thumb aiming for it selected the entry description instead. The snapshot Revert button in the Polish panel was 11px text and a matching icon on a row with no vertical padding of its own (~16px tall), and the World style Clear button in the Storyboard config tab was bare 9px text (~10x22px). All three now clear the 44px floor the rest of the app uses. Each one bleeds into the padding its own row already had rather than adding height on top of it, so the bible list and the snapshot list keep their density and the Clear button stays inside its stack gap instead of overlapping the style dropdown beneath it.
diff --git a/client/src/components/writers-room/BibleSection.jsx b/client/src/components/writers-room/BibleSection.jsx
index dbe2a6564a..4e3dcd172f 100644
--- a/client/src/components/writers-room/BibleSection.jsx
+++ b/client/src/components/writers-room/BibleSection.jsx
@@ -184,9 +184,11 @@ function BibleRow({ item, config, onEdit, readingTheme }) {
</div>
)}
</div>
+ {/* 44px tap target; the negative margins let it bleed into the row's
+ own px-3/py-2 padding so a one-line row doesn't grow taller. */}
<button
onClick={onEdit}
- className="text-gray-500 hover:text-port-accent shrink-0"
+ className="shrink-0 flex items-center justify-center min-w-[44px] min-h-[44px] -my-2 -mr-3 text-gray-500 hover:text-port-accent"
title={config.editButtonTitle}
aria-label={`Edit ${config.getDisplayName(item)}`}
>
diff --git a/client/src/components/writers-room/BibleSection.test.jsx b/client/src/components/writers-room/BibleSection.test.jsx
index 42971b64a5..31d781759e 100644
--- a/client/src/components/writers-room/BibleSection.test.jsx
+++ b/client/src/components/writers-room/BibleSection.test.jsx
@@ -233,6 +233,20 @@ describe.each(SCENARIOS)('$label (BibleSection)', (s) => {
expect(screen.getByText(displayText(s.existingItem))).toBeInTheDocument();
});
+ // The row Edit button used to render as a bare 11px pencil icon, which is a
+ // ~11px tap target on a phone (#3565). Assert the utility tokens rather than
+ // computed geometry — jsdom doesn't apply Tailwind.
+ it('a11y: the row Edit button meets the 44px touch-target floor', async () => {
+ s.api.list.mockResolvedValue([s.existingItem]);
+
+ render(<s.Component workId="work-1" />);
+ await screen.findByText(displayText(s.existingItem));
+
+ const editBtn = screen.getByRole('button', { name: `Edit ${displayText(s.existingItem)}` });
+ expect(editBtn.className).toContain('min-h-[44px]');
+ expect(editBtn.className).toContain('min-w-[44px]');
+ });
+
it('a11y: the identity field exposes an accessible name matching its config label', async () => {
s.api.list.mockResolvedValue([]);
render(<s.Component workId="work-1" />);
diff --git a/client/src/components/writers-room/PolishPanel.jsx b/client/src/components/writers-room/PolishPanel.jsx
index e61e4fe0de..14ebc68575 100644
--- a/client/src/components/writers-room/PolishPanel.jsx
+++ b/client/src/components/writers-room/PolishPanel.jsx
@@ -231,11 +231,13 @@ export default function PolishPanel({ work, dirty, onBodyChanged }) {
{typeof s.qualityScore === 'number' && <span className="text-gray-500"> · <ScoreBadge value={s.qualityScore} inline /></span>}
</span>
<span className="text-gray-600 text-[10px] shrink-0">{s.wordCount?.toLocaleString()}w · {timeAgo(s.createdAt, '')}</span>
+ {/* 44px tap target; -my-1.5/-mr-2 bleed into the row's own
+ padding so the snapshot list keeps its density. */}
<button
onClick={() => revert(s.id)}
disabled={running || reverting === s.id}
title="Revert the draft to this snapshot"
- className="flex items-center gap-1 text-gray-400 hover:text-white disabled:opacity-40 text-[11px]"
+ className="shrink-0 flex items-center justify-center gap-1 min-h-[44px] px-2 -my-1.5 -mr-2 text-gray-400 hover:text-white disabled:opacity-40 text-[11px]"
>
<RotateCcw size={11} className={reverting === s.id ? 'animate-spin' : ''} /> Revert
</button>
diff --git a/client/src/components/writers-room/PolishPanel.test.jsx b/client/src/components/writers-room/PolishPanel.test.jsx
new file mode 100644
index 0000000000..e2a51db4a3
--- /dev/null
+++ b/client/src/components/writers-room/PolishPanel.test.jsx
@@ -0,0 +1,43 @@
+import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
+import { render, screen, cleanup } from '@testing-library/react';
+
+vi.mock('../../services/apiWritersRoom', () => ({
+ startWritersRoomPolish: vi.fn(),
+ cancelWritersRoomPolish: vi.fn(),
+ getWritersRoomPolishStatus: vi.fn(),
+ listWritersRoomPolishSnapshots: vi.fn(),
+ revertWritersRoomPolishSnapshot: vi.fn(),
+}));
+
+vi.mock('../ui/Toast', () => ({
+ default: Object.assign(vi.fn(), { success: vi.fn(), error: vi.fn() }),
+}));
+
+import PolishPanel from './PolishPanel';
+import {
+ getWritersRoomPolishStatus,
+ listWritersRoomPolishSnapshots,
+} from '../../services/apiWritersRoom';
+
+describe('PolishPanel', () => {
+ beforeEach(() => {
+ vi.clearAllMocks();
+ getWritersRoomPolishStatus.mockResolvedValue({ active: false });
+ listWritersRoomPolishSnapshots.mockResolvedValue([
+ { id: 'snap-1', cycle: 1, label: 'Cycle 1', wordCount: 1200, qualityScore: 7.5, createdAt: new Date().toISOString() },
+ ]);
+ });
+ afterEach(() => {
+ cleanup();
+ });
+
+ // The snapshot Revert button used to be an 11px icon + 11px label with no
+ // vertical padding — a ~16px tall tap target on a phone (#3565). Assert the
+ // utility tokens rather than computed geometry; jsdom applies no Tailwind.
+ it('a11y: the snapshot Revert button meets the 44px touch-target height floor', async () => {
+ render(<PolishPanel work={{ id: 'work-1' }} dirty={false} />);
+
+ const revertBtn = await screen.findByRole('button', { name: /revert/i });
+ expect(revertBtn.className).toContain('min-h-[44px]');
+ });
+});
diff --git a/client/src/components/writers-room/StoryboardConfigTab.jsx b/client/src/components/writers-room/StoryboardConfigTab.jsx
index aeead60bed..6be0122dba 100644
--- a/client/src/components/writers-room/StoryboardConfigTab.jsx
+++ b/client/src/components/writers-room/StoryboardConfigTab.jsx
@@ -71,10 +71,12 @@ function WorldStyleRow({ value, presets, onChange }) {
<Palette size={10} /> World style
</span>
{value.presetId !== STYLE_ID.NONE && (
+ // 44px tap target; -my-1 stays inside the 1.5 stack gap so the box
+ // never overlaps the preset <select> below it.
<button
type="button"
onClick={() => pickPreset(STYLE_ID.NONE)}
- className="text-[9px] text-gray-500 hover:text-port-error"
+ className="shrink-0 flex items-center justify-center min-w-[44px] min-h-[44px] -my-1 text-[9px] text-gray-500 hover:text-port-error"
title="Clear style"
>
Clear
diff --git a/client/src/components/writers-room/StoryboardConfigTab.test.jsx b/client/src/components/writers-room/StoryboardConfigTab.test.jsx
new file mode 100644
index 0000000000..ecc2d5d7ac
--- /dev/null
+++ b/client/src/components/writers-room/StoryboardConfigTab.test.jsx
@@ -0,0 +1,45 @@
+import { describe, it, expect, afterEach, vi } from 'vitest';
+import { render, screen, cleanup } from '@testing-library/react';
+
+// The Adapt-LLM picker fetches prompts + providers on mount; this suite only
+// cares about the World style row, so stub it out.
+vi.mock('./StagePromptModelPicker', () => ({
+ default: () => null,
+}));
+
+import StoryboardConfigTab from './StoryboardConfigTab';
+import { STYLE_ID, WR_IMAGE_DEFAULTS } from '../../lib/wrImageDefaults';
+
+const baseProps = {
+ imageCfg: WR_IMAGE_DEFAULTS,
+ models: [],
+ availableBackends: [],
+ onCfgChange: () => {},
+ stylePresets: [{ id: 'noir', label: 'Noir', category: 'Film', prompt: 'high contrast noir', negativePrompt: '' }],
+ imageStyle: { presetId: 'noir', prompt: 'high contrast noir', negativePrompt: '' },
+ onStyleChange: () => {},
+ onOpenImageGenSettings: () => {},
+};
+
+describe('StoryboardConfigTab', () => {
+ afterEach(() => {
+ cleanup();
+ });
+
+ // The world-style Clear button used to be bare 9px text with no padding — a
+ // ~10x22px tap target on a phone (#3565). Assert the utility tokens rather
+ // than computed geometry; jsdom applies no Tailwind.
+ it('a11y: the world-style Clear button meets the 44px touch-target floor', () => {
+ render(<StoryboardConfigTab {...baseProps} />);
+
+ const clearBtn = screen.getByRole('button', { name: 'Clear' });
+ expect(clearBtn.className).toContain('min-h-[44px]');
+ expect(clearBtn.className).toContain('min-w-[44px]');
+ });
+
+ it('hides the Clear button when no world style is set', () => {
+ render(<StoryboardConfigTab {...baseProps} imageStyle={{ presetId: STYLE_ID.NONE, prompt: '', negativePrompt: '' }} />);
+
+ expect(screen.queryByRole('button', { name: 'Clear' })).toBeNull();
+ });
+});