the path gets the row, the actions get their own

Root location is two states now. reading, it is a path and one Edit. editing, it
is a field and the things you can do to it.

the actions moved to the block's BOTTOM row, off the value's line. an absolute
path is long, and it was being truncated to make room for buttons that are not
needed most of the time — the thing somebody opened this to read was the thing
squeezed. shown, it wraps with `break-all` rather than truncating, because a path
is read from both ends: the machine at the front, the folder at the back, and
hiding either is worse than two lines.

Edit is a mode and not an always-live field. this is looked at far more often than
it is changed, and a live input invites a stray keystroke into a path everything
else will depend on. Cancel restores what is stored, so leaving the mode cannot
leave half a path on screen looking like the setting.

"back to the default" is gone, as asked — and `clearRootPath` and its DELETE route
with it, since that button was the only caller. an unreferenced endpoint is the
same rot as an unreferenced component, and this one was a second, quieter Save
that wrote a value nobody chose.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-29 00:41:50 +01:00
co-authored by Claude Opus 5
parent d5f2d8f370
commit df52045eaa
4 changed files with 65 additions and 52 deletions
+3 -13
View File
@@ -14,7 +14,9 @@ import { fofosAdminSettings } from '../db/schema';
* restore onto a machine with a different owner then points at a directory that does not exist while
* looking deliberately chosen. Computed, it follows the machine; written, it follows the install.
*
* A saved path is a DECISION and is stored exactly as given. Only the absence of one is derived.
* A saved path is a DECISION and is stored exactly as given. Only the absence of one is derived — and
* once saved it stays saved: there is no route back to the default, because "reset this to something
* you never chose" is not a thing anybody asked for and it read as a second, quieter Save.
*
* ── Absolute, always ──
*
@@ -81,15 +83,3 @@ export async function saveRootPath(input: string, email: string): Promise<Settin
return readSettings(email);
}
/** Back to the computed default. The row stays, so this is a reset rather than a delete. */
export async function clearRootPath(email: string): Promise<SettingsView> {
const existing = await row();
if (existing) {
await db
.update(fofosAdminSettings)
.set({ rootPath: null, updatedAt: new Date() })
.where(eq(fofosAdminSettings.id, existing.id));
}
return readSettings(email);
}