Skip to content

Write a skill on a screen of its own, and come back to lists where you left them - #906

Open
guidovizoso wants to merge 4 commits into
mainfrom
guido/ux-champion
Open

guidovizoso wants to merge 4 commits into
mainfrom
guido/ux-champion

Conversation

@guidovizoso

Copy link
Copy Markdown
Collaborator

What this changes

Skills get screens of their own, laid out a section at a time. New skill (/capabilities/skills/new) and each skill's page (/capabilities/skills/$slug) replace the dialogs. The ?new and ?edit= addresses redirect to them.

  • Details: one card with a settings row each for Command, Title and One-liner. Each row has the label and hint on the left and the input on the right; a field's error replaces its hint.
  • Instructions: the text box on its own.
  • Tools: a row per app. Each opens a step listing that app's tools, with search from 10 tools up. The list is sized to the window and scrolls inside itself, so Back and Done are always visible.
  • Bots: a switch for each Bot you own.
    • On New, your picks are added to those Bots right after the skill is created. If one fails, you land on the skill's page to see which Bots it is on.
    • On an existing skill, each switch saves as soon as you flip it, so this section sits below Save.
  • Delete: a section on the skill's page, behind a confirmation dialog. The dropdown on the list is gone.

The list: each skill is a card that opens it when clicked. It shows the command as a pill and a chip such as "2 Bots · 5 tools", with small Bot avatars. The "Put on a Bot" button is gone.

Back button: it floats in the page's top-left corner, only as wide as itself, instead of a full-width band that covered the top of a scrolled page.

Lists keep their scroll position. TanStack Router's scroll restoration was never turned on, so every list started at the top after a detail screen. It is now on, keyed by address rather than history entry. The "<" button opens the list as a new history entry, so keying by entry would never find a position to restore. PageShell's scroller carries data-scroll-restoration-id, so pages under _authed/_app (which scroll inside the page, not the window) are restored too. A page opened for the first time still starts at the top.

Cleanup: main removed the demonstration recorder, the only user of the skill form's single-column layout, so that layout and the framed/fit options are gone.

Where it runs

  • New state that outlives a request? None on the server. Scroll positions live in the browser's sessionStorage, through TanStack Router.
  • What happens on the second replica? Nothing different. These are client screens using the existing endpoints: POST/DELETE /api/plugins/skills and POST/DELETE /api/plugins/grants.
  • Anything serialised? No.
  • Anything fanned out to a browser? No.
  • New listener, port, or schedule? No.

Boundary and audit

  • Every acting call still goes through the gateway. No server changes.
  • There are no new refusals or failures. Adding a skill to a Bot still goes through the server's existing check that you own both the skill and the Bot.
  • Nothing new is trusted from the client.

Changelog

  • "Writing a skill is a screen of its own, and lists keep their place", under Unreleased.

Proof

  • bunx tsc --noEmit in app/ passes.
  • bunx biome lint --error-on-warnings app/src passes. biome check on the changed files passes; the 4 import-order errors it reports elsewhere are already on main.
  • bun test app/tests: 2128 pass and 1 fails. The failure is serve.test.ts › "a stalled handshake times out…", which this branch doesn't touch.
  • Checked by hand in the running app:
    • Creating /sections-test with a Bot switched on created the skill already on that Bot.
    • An empty Title shows "A title is required." in its row and disables Save.
    • A long app's tool list fits the window, with Back and Done visible.
    • Scroll restoration: /admin/plugins scrolled to 400 came back to 400 after opening Composio, which opened at 0. /capabilities/skills scrolled to 150 came back to 150, both with the back button and with browser Back.

As a full-width band it covered the top of every scrolled page for a control that sits beside the
centred column. It now floats over the scroller's corner, only as wide as its buttons, and the
column keeps the same starting position through its own padding.
New skill and each skill's page (/capabilities/skills/new and /capabilities/skills/$slug) replace
the dialogs. The form is split into Details, Instructions, Tools and Bots sections; tools are
picked one app at a time, in a step whose list scrolls inside the window; Bots are switches, picked
before creating or saved as switched on an existing skill; and Delete is a section of the skill's
page, behind a confirmation.

The list shows each skill as a card that opens it, with its command and a chip for the Bots it is
on and the tools it needs. The old ?new and ?edit addresses redirect to the new screens.
Scroll restoration was never turned on, so every list started over at the top after a detail
screen. It is now on, keyed by address rather than history entry, because the way back is usually
the back button, a link that makes a new entry. PageShell's scroller is named so it is restored
too, and a page opened for the first time still starts at the top.
The demonstration recorder that used the single-column form is gone from main, so the form and the
tools picker are only ever a screen of their own; the inline layout and its framed and fit options
had no caller left.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant