Homepage ':edit' should match fzt-automate's edit submenu (navigate + Shift+Enter), not swap to HTML tree editor #20

Open
opened 2026-04-18 12:09:48 -07:00 by nelsong6 · 0 comments
nelsong6 commented 2026-04-18 12:09:48 -07:00 (Migrated from github.com)

Context

my-homepage#15 fixed the silent no-op on `:edit` by wiring it to `enterEditMode()` — which swaps the terminal out for the HTML tree editor. That preserved the pre-2026-04-05 behavior (when `homectl:edit` was a bookmark with that URL action) but it's not the intended UX going forward.

Intended behavior

`:edit` should work like it does in fzt-automate today:

  • `:` palette → `edit` is a submenu, not a leaf
  • Children: `add-after`, `add-folder`, `edit-item` (rename), `delete`, `save`
  • Selecting a child sets the fzt EditMode state (add-after / rename / delete / inspect / save)
  • User navigates the bookmark tree to the target item and hits Shift+Enter to confirm at that location
  • All editing happens inside fzt — the HTML tree editor component can be deprecated / removed

This is the same flow already shipped in fzt-automate v0.1.26:

```
→ edit
├── add-after (Action: add-after)
├── add-folder (Action: add-folder)
├── edit-item (Action: rename)
├── delete (Action: delete)
└── save (Action: save)
```

fzt-frontend's `HandleCommandAction` already handles all five actions correctly. The homepage frontend just needs to register the same submenu structure via `fzt.addCommands()` and remove the `action === "edit"` → `enterEditMode()` callback.

Where

  • frontend/fzh-terminal.js line 45-50 — change the `addCommands()` call:
    ```js
    { name: "edit", description: "Edit bookmark tree", action: "edit" },
    ```
    to a nested structure (the add-commands API may need extending to support children — check fzt-terminal WASM bridge).
  • frontend/script.js line 85-86 — remove the `action === "edit"` handler (enterEditMode call). Same for `logout` if the palette-logout flow is also moved.

Open questions

  • Does fzt-browser's `addCommands()` API accept nested children today? If not, extend it or register per-action at top level.
  • Save flow already works via `PUT /homepage/api/bookmarks` — the `save` action in HandleCommandAction writes through `SaveMenu` which is automate-specific (`/at/api/menu`). The homepage needs its own save handler that hits `/homepage/api/bookmarks`.
  • Should the HTML tree editor be removed entirely, or kept as a fallback for non-fzt editing? Removing simplifies, but loses mouse-based editing.

Acceptance

  • `:` → `edit` expands to the 5 action children
  • Selecting one activates fzt edit mode
  • Shift+Enter on a bookmark applies the chosen edit
  • HTML tree editor deprecated (or kept only as a toolbar fallback)
## Context [my-homepage#15](https://github.com/nelsong6/my-homepage/issues/15) fixed the silent no-op on \`:edit\` by wiring it to \`enterEditMode()\` — which swaps the terminal out for the HTML tree editor. That preserved the pre-2026-04-05 behavior (when \`homectl:edit\` was a bookmark with that URL action) but it's not the intended UX going forward. ## Intended behavior \`:edit\` should work like it does in fzt-automate today: - \`:\` palette → \`edit\` is a **submenu**, not a leaf - Children: \`add-after\`, \`add-folder\`, \`edit-item\` (rename), \`delete\`, \`save\` - Selecting a child sets the fzt EditMode state (add-after / rename / delete / inspect / save) - User navigates the bookmark tree to the target item and hits Shift+Enter to confirm at that location - All editing happens inside fzt — the HTML tree editor component can be deprecated / removed This is the same flow already shipped in fzt-automate v0.1.26: \`\`\` : → edit ├── add-after (Action: add-after) ├── add-folder (Action: add-folder) ├── edit-item (Action: rename) ├── delete (Action: delete) └── save (Action: save) \`\`\` fzt-frontend's \`HandleCommandAction\` already handles all five actions correctly. The homepage frontend just needs to register the same submenu structure via \`fzt.addCommands()\` and remove the \`action === "edit"\` → \`enterEditMode()\` callback. ## Where - [frontend/fzh-terminal.js](https://github.com/nelsong6/my-homepage/blob/main/frontend/fzh-terminal.js) line 45-50 — change the \`addCommands()\` call: \`\`\`js { name: "edit", description: "Edit bookmark tree", action: "edit" }, \`\`\` to a nested structure (the add-commands API may need extending to support children — check fzt-terminal WASM bridge). - [frontend/script.js](https://github.com/nelsong6/my-homepage/blob/main/frontend/script.js) line 85-86 — remove the \`action === "edit"\` handler (enterEditMode call). Same for \`logout\` if the palette-logout flow is also moved. ## Open questions - Does fzt-browser's \`addCommands()\` API accept nested children today? If not, extend it or register per-action at top level. - Save flow already works via \`PUT /homepage/api/bookmarks\` — the \`save\` action in HandleCommandAction writes through \`SaveMenu\` which is automate-specific (\`/at/api/menu\`). The homepage needs its own save handler that hits \`/homepage/api/bookmarks\`. - Should the HTML tree editor be removed entirely, or kept as a fallback for non-fzt editing? Removing simplifies, but loses mouse-based editing. ## Acceptance - \`:\` → \`edit\` expands to the 5 action children - Selecting one activates fzt edit mode - Shift+Enter on a bookmark applies the chosen edit - HTML tree editor deprecated (or kept only as a toolbar fallback)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
romaine-life/my-homepage#20
No description provided.