Updating

Record the commit each item came from. To update, install a newer commit and read the diff.

Record what you installed

The app setup installs scripts/uicontext-lock.ts. After an install, record the items and the commit you installed them from. Commit uicontext.lock.json with the files.

node scripts/uicontext-lock.ts record 4464127 app-setup app-bootstrap app-shell
{  "registry": "checkfu/uicontext",  "items": {    "app-shell": {      "ref": "4464127",      "files": {        "src/ui/uicontext/components/kit/AppShell.ts": "sha256-…",        "src/ui/uicontext/components/kit/appShell.stylex.ts": "sha256-…"      }    }  }}

The lock holds a hash of each file as installed, so it can tell which files you have edited since.

Update an item

  1. See what you changed

    Start from a clean working tree. status lists the installed files you edited: keep those edits through the update.

    node scripts/uicontext-lock.ts status
    app-shell @ 4464127session @ 4464127Changed since install (keep these edits when you update):  edited  src/ui/uicontext/components/kit/AppShell.ts  (app-shell)
  2. Install the newer commit

    --overwrite replaces the item's files, and the files it imports, with that commit's.

    npx shadcn@latest add checkfu/uicontext/app-shell#<sha> --overwrite
  3. Read the diff

    Review the changes, put back your own edits, and run your typecheck and tests.

    git diff
  4. Record the new commit

    node scripts/uicontext-lock.ts record <sha> app-shell

    Commit the lock with the update. The lock's diff then shows which items moved and from which commit.