mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-18 18:04:17 +00:00
* feat(hooks): browse, edit and remove unmanaged hooks in the import dialog The import dialog listed every target's hooks in one long scroll of full commands, so it was hard to read and hard to tell which target a row belonged to. It also offered no way to change a hook without first handing it to skillshare. The dialog now shows one target at a time from a rail, with two-line rows that open to the full commands. A hook that lives as an event in a target's settings file can be edited or removed in place: the change stays pending, a review step shows the file diff, and only then is the file written, with a backup that restores it. The hook stays unmanaged. The write is a new operation in internal/hooks (PreviewNativeEdits and ApplyNativeEdits) that addresses elements by content, refuses anything a ledger record holds, and reuses the existing backup and journal path. Whole-file hooks, Copilot files and Antigravity blocks still have to be imported first. * fix(hooks): keep repeated restores and retries from writing a hook twice Two ways an unmanaged hook could end up in a target file twice: Restoring the backup of a removal a second time appended the hook again. An unmanaged hook has no ledger record, so nothing marked the backup as restored. PreviewRestore now reports a conflict when the removed hook is already in the file. When the dialog's native write succeeded and a later import failed, the retry compared each pending change with the row it was made in. An edit that moves or adds a command under another event comes back as other rows, so the change stayed pending and was written again, and the new row was picked for import. The dialog now drops every change once the write went through (or reports files it already applied), and keeps only the rows picked before as imports for the targets it wrote. * chore: release as 0.30.9 Keep the next release on the patch version the maintainer asked for, instead of the 0.31.0 that Release Please derives from the feat commit. Release-As: 0.30.9 * fix(hooks): tell a restored hook from a surviving twin, keep unwritten edits The check that refuses a second restore of a removed unmanaged hook looked for any unmanaged hook with the same content. When one of two identical hooks was removed, the survivor made the first restore look done. A removal that shifts later hooks is stored as an update plus a removal, which the check did not cover, and a restored hook that was imported afterwards no longer counted, so those backups could still restore twice. Every change to an unmanaged hook now records how many identical hooks the write left, and a restore is refused only when the file holds more than that. When a native write failed after its first file, the dialog dropped every pending change, including those of files the write never reached. The failure response now lists the applied files in error_params, and the dialog drops only the changes of those files. Pasted candidates are no longer unpicked by a write to the target they were pasted for. * fix(ui): show a hook row's edit and remove actions once An open row in the import dialog showed the pencil and trash icons next to the labelled Edit and Remove buttons below, which do the same thing. The icons now hide while the row is open; their space is kept so the chevron stays where it was clicked. * chore: release as 0.30.9 Keep the next release on the patch version the maintainer asked for, instead of the 0.31.0 that Release Please derives from the feat commit. Release-As: 0.30.9 * fix(hooks): count surviving twins for every backup, not only native edits Only the native edit preview recorded how many identical hooks a write left, so the backup a restore writes had no count. Undoing a restore through Backups was then refused whenever a hook with the same content was still in the file. The count now happens where every backup is written. * fix(ui): keep the row icons as the only edit and remove actions The labelled Edit and Remove buttons under an open row repeated the icons and stood out too much, so they are gone and the icons stay visible on open rows again. Each icon now has a tooltip that says what it does. * chore: release as 0.30.9 Keep the next release on the patch version the maintainer asked for, instead of the 0.31.0 that Release Please derives from the feat commit. Release-As: 0.30.9 * fix(ui): put the import dialog's hooks on one card, with fewer lines and fills The dialog mixed a grey rail, a grey footer, grey expanded rows and a divider around every region, and the editor stacked its own Cancel and Done above the dialog's. It read as cluttered, and a long JSON line pushed the editor's controls out of the dialog. The dialog now sits on the page background with the hook list, or the editor, as one card. Rows are separated only by the list separator, the row icons are neutral until hovered, and code is the only sunken fill. One row is open at a time, and a single command no longer repeats its event as a heading. While a hook is edited, the dialog's footer holds the editor's actions, so there is one row of buttons and Cancel returns to the list instead of closing the dialog with the draft. Commands are sections of the card and wrap instead of scrolling sideways. The dialog is larger. The hint is one line, the edit note moved to the footer, and the name field is labelled by where the name is used. * chore: release as 0.30.9 Keep the next release on the patch version the maintainer asked for, instead of the 0.31.0 that Release Please derives from the feat commit. Release-As: 0.30.9 * fix(ui): give the import review step the same card-on-ground look The review step still had the white body, the grey footer and the bordered summary box, so it looked like a different dialog from the list it follows. It now sits on the page background with the summary as one card, and the removal tile is neutral with only its icon in the danger colour. * chore: release as 0.30.9 Keep the next release on the patch version the maintainer asked for, instead of the 0.31.0 that Release Please derives from the feat commit. Release-As: 0.30.9
Website
Documentation site for skillshare, built with Docusaurus.
Install
npm install
Local Development
npm start
Quality Checks
npm run typecheck
npm run clear
Build and Preview
npm run build
npm run serve
Deployment
npm run deploy
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the gh-pages branch.