Skip to content

feat(web): rename the floor to Home, focus its task box, open it with ⌘K - #127

Merged
kalaspuff merged 5 commits into
mainfrom
fctl/69-could-you-redesign-a-nicer-icon-for-the
Oct 20, 2026
Merged

kalaspuff merged 5 commits into
mainfrom
fctl/69-could-you-redesign-a-nicer-icon-for-the

Conversation

@fctl-sh

@fctl-sh fctl-sh Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

The sidebar's first item was called Floor and used lucide's house. Floor (as in factory floor) didn't say what the page is, and the house didn't match the rest of the sidebar. Starting a session also meant clicking into the task box first. This pull request:

  • Renames the floor to Home. It is the page the app opens on and returns to, and it holds more than the agents at work (invitations, setup steps, plan usage), so a plain name fits it better than a more specific one like "Agents". The sidebar, ⌘K, the error and not-found pages ("Back home"), the copy that pointed people to the floor ("join on Home", "on the home page") and the docs say Home or the home page now. The hero's empty state reads "All quiet. Start something." Old /floor links still suggest / on the not-found page.
  • Draws a new icon for it: a house with eaves and its light on. The dot matches the yellow dot beside a project whose agents are working. It is drawn on lucide's grid (24 units, 2-unit round strokes) so it sits beside Admin's and Settings' icons, and it lives in web/src/components/ui/icons.tsx next to the GitHub mark.
  • Focuses the task box as the home page opens, so you can type right away. Phones and tablets (pointer: coarse) are left out, because a focused field would raise their keyboard over the page. The box also leaves the focus alone if you are already typing in another field, such as ⌘K's search. A kept draft comes back with its caret where it was.
  • Puts Home first in ⌘K (hint "new session"). Enter on it opens the home page with the focus in the task box, also when the page is already open. So ⌘K, Enter, the task and ⌘Enter start a session from anywhere using only the keyboard. Enter in the palette now calls preventDefault, so the key doesn't carry over into the task box it has just focused as a line break.

The focus goes through a small module, web/src/lib/task-box.ts. ⌘K calls focusTaskBox(), which focuses the box if the page shows it, or else as soon as the page shows it. Internal names follow the rename: the scene component Floor is now Threads. Comments, ROADMAP.md, docs/README.md, getting-started, architecture and development also say the home page now. Getting started now explains the ⌘K and Enter shortcut. "Floor" in the disk-space sense (hosts' min_free_disk_mb), the ADRs and the CHANGELOG are unchanged.

Verification

  • New tests: web/src/lib/task-box.test.tsx, six cases (focus on opening, a box that shows later, typing elsewhere, phones, ⌘K while the page shows the box, ⌘K on the way there and only once). web/src/components/shell/command-palette.test.tsx: Home is listed before the sessions; Enter navigates to /, focuses the box and is defaultPrevented. I checked that both files fail when preventDefault or the deferred ⌘K request is removed.
  • npm run check (Biome and TypeScript) and the whole Vitest suite: 43 files, 185 tests, after merging main.
  • cargo xtask check --quick: all checks passed.
  • In Chromium against cargo xtask dev with fake-claude sessions:
    • after sign-in, the task box has the focus and the page does not scroll;
    • the sidebar's Home focuses it;
    • ⌘K → Enter from a project page and from the home page itself focuses it, with no stray line break, and typing goes straight in;
    • a kept draft comes back focused with its caret in place;
    • on an emulated iPhone the box waits for a tap, and tapping Home in the palette focuses it.

Screenshots

At 78d63c7, 1440 px wide at 2x, from cargo xtask dev. The merges from main since then change nothing they show.

The sidebar, from a project page:

Before After
Dark Before: Floor with lucide's house, dark After: Home with the new icon, dark
Light Before: Floor with lucide's house, light After: Home with the new icon, light

The icon, large and at sidebar size, inactive and active, in both themes (rendered from the same SVG):

Before: lucide's house next to Floor; after: a house with eaves and a dot next to Home, dark and light

⌘K with nothing typed: Home comes first and is selected, so Enter takes it.

Before After
Before: ⌘K lists sessions first After: ⌘K lists Home first, with the hint "new session"

The home page right after arriving from the sidebar. Before, the focus stayed on the sidebar link; after, the task box has it (its accent border and ring).

Before After
Before: the task box without focus After: the task box focused, dark

After: the task box focused, light

On a phone (390 px), the task box waits for a tap, so the keyboard stays down:

After: the home page on a phone, task box not focused

Made in fctl session https://app.fctl.sh/s/ses_01M5CD3ZM8N4JP0SVB86R2NK2D

fctl-sh Bot added 3 commits October 20, 2026 11:24
The sidebar's first item was called Floor, after the factory floor, and
used lucide's house. It is Home now, with an icon of its own: a house
with its light on, drawn on lucide's grid like Admin's and Settings'.

The task box takes the focus as the home page opens, on computers (a
phone would raise its keyboard over the page). ⌘K lists Home first, and
Enter on it focuses the task box, also when the page is already open, so
⌘K, Enter, the task and ⌘Enter start a session from anywhere. Enter no
longer goes on to the field that has the focus after the palette closes.
@fctl-sh
fctl-sh Bot requested a review from kalaspuff as a code owner October 20, 2026 11:26
…esign-a-nicer-icon-for-the

# Conflicts:
#	docs/getting-started.md
kalaspuff
kalaspuff previously approved these changes Oct 20, 2026
…esign-a-nicer-icon-for-the

# Conflicts:
#	docs/getting-started.md
#	web/src/components/session/row.tsx
@kalaspuff
kalaspuff merged commit b580d52 into main Oct 20, 2026
6 checks passed
@kalaspuff
kalaspuff deleted the fctl/69-could-you-redesign-a-nicer-icon-for-the branch October 20, 2026 11:33
kalaspuff pushed a commit that referenced this pull request Oct 20, 2026
Follows #125 and #126.

#125 (`0014_workspace_skip_invites.sql`) and #124
(`0014_session_pull_requests.sql`) were open together and merged one
after the other, so `main` has two migrations numbered 0014. Nothing
breaks: wrangler records migrations by file name and applies every file
it hasn't recorded (`getUnappliedMigrationNames`), and its next number
is the highest plus one, so the next migration is 0015. The two add
columns to different tables (`workspaces` and `sessions`), so their
order doesn't matter. app.fctl.sh applied #125's at its deploy
(`0014_workspace_skip_invites.sql ✅`) before #124's.

Renaming either file is what would break: wrangler would see a new name
and run its `ALTER TABLE … ADD COLUMN` again, which fails on a database
that has the column. So:

- `docs/self-hosting.md`: a new standalone server now applies 15
migrations, not 14 (#126 counted before #124 was merged).
- `AGENTS.md`: the migration rule now says names are part of what's
immutable, to number a new migration after the highest, and to leave the
two 0014s as they are.

## Verification

On this branch (`main` at 8b4b699, plus these lines):
`FCTL_SETUP_TOKEN=dev-setup-token cargo xtask serve` with a new data
directory logs `Applied 15 database migrations`, `cargo xtask dev
--smoke --server http://localhost:8787` passed through it, and `fctl
workspaces set --skip-invites on` returned `"skip_invites": true` from
it. The branch merges cleanly with `main` at b580d52 (#127), which adds
no migration.

Session: https://app.fctl.sh/s/ses_01M5CCM54M0DDN4RFRH5J5C0KW

Co-authored-by: fctl-sh[bot] <fctl-sh[bot]@users.noreply.github.com>
kalaspuff pushed a commit that referenced this pull request Oct 28, 2026
## Summary

The Agent Floor puts the focus in its task box as it opens (since #127),
and in a text field Chrome, Safari and Firefox on a Mac use ⌘← and ⌘→ to
move the caret to the start or the end of the line instead of going back
and forward. So once back or forward landed on the Agent Floor, ⌘← and
⌘→ did nothing there, while the browser's buttons, which don't depend on
the focus, kept working. Now, while the task box is empty, ⌘← and ⌘→ in
it go back and forward on Apple's systems; with text in it they move the
caret as in any field. Other systems are unaffected: their browsers go
back with Alt+←, which works in a field too. Getting started says so.

New tests in `web/src/lib/task-box.test.tsx` cover the empty box, a box
with text, ⇧, ⌥ and input methods, and Windows; the one for the empty
box fails without the fix. `cargo xtask check web` passes. In headless
Chromium and WebKit against `cargo xtask dev`, with a Mac's user agent,
⌘→ and ⌘← in the empty box went forward to a session and back to
Settings, and with a task written in the box they left the page alone.
Headless browsers don't run their own ⌘← and ⌘→ outside fields, so those
steps used `history.back()` and `history.forward()`.

## Worth confirming

- **Decision:** With text in the box, a draft kept from an earlier visit
included, ⌘← and ⌘→ move the caret rather than leave the page, so from a
box with text they go back and forward only once it is empty again (the
browser's buttons always do). The alternative was to stop focusing the
box when back or forward opens the Agent Floor, which would also change
what the buttons do.

[fctl session](https://app.fctl.sh/s/ses_01M60XCA0T84RD78JQRJ1K3MWP)

Co-authored-by: fctl-sh[bot] <343971779+fctl-sh[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant