Files
skillshare/ui
Willie 3872cb5525 fix(install): record a per-skill source every host can install again (#863)
* fix(install): record a per-skill source every host can install again

`install <repo> -s <skill>` joined the repository and the skill path with
a single "/". GitLab and Bitbucket URLs have no fixed depth, so the parser
read the result as a longer repository path, and file:// URLs only split
on "//". The recorded string is what a project's config.yaml shares, so
`install -p` on a fresh clone tried to clone a repository that does not
exist.

Whole-repo file:// sources now join with "//", and GitLab or Bitbucket
sources typed without ".git" or a web URL marker join with ".git/". The
other hosts keep their form.

`install --update` still recognises a record in the old form, but only
when its recorded repository and path agree, because on these hosts the
same string can also name a repository of its own. The dashboard's
install dialog matched installed skills by rebuilding the old form, so it
now accepts each form the server writes.

Closes #859

* fix(ui): mark hub results installed under the new recorded source

A hub entry that names a repository and a skill was matched against the
installed skills by an exact source or a "<source>/" prefix. A GitLab or
Bitbucket repository typed without ".git" is now recorded as
"<source>.git/<skill>", so the search row and the preview kept offering
Install, and a second install hit the already-exists warning.

The matcher now accepts the ".git/" join as well. This is the same class
as the discovery list fixed in the previous commit: both rebuild the
recorded source in the dashboard. No other dashboard or Go code matches a
recorded source by prefix.
2026-11-11 23:14:39 +08:00
..
2026-04-19 09:29:18 +08:00

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

React Compiler

The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...

      // Remove tseslint.configs.recommended and replace with this
      tseslint.configs.recommendedTypeChecked,
      // Alternatively, use this for stricter rules
      tseslint.configs.strictTypeChecked,
      // Optionally, add this for stylistic rules
      tseslint.configs.stylisticTypeChecked,

      // Other configs...
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])

You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:

// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...
      // Enable lint rules for React
      reactX.configs['recommended-typescript'],
      // Enable lint rules for React DOM
      reactDom.configs.recommended,
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])