Skip to content

feat: Track the commit a catalogue shows, visualice changes, and partial runs with crawl --only - #1

Open
alexecus wants to merge 8 commits into
mainfrom
feat/update-mode
Open

alexecus wants to merge 8 commits into
mainfrom
feat/update-mode

Conversation

@alexecus

@alexecus alexecus commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Updating a catalogue after code changes

  • Each crawl records the git commit it shot: a visualice-source line in visualice.routes.md, and source in the run's crawl-map.json (branch, uncommitted files, local or deployed target, config hash).
  • New visualice changes [--json] [--discover]: diffs the project against that commit and gives a verdict (none / partial / full / unknown):
    • finds site-wide changes (dependencies, global CSS, root layouts, header/footer/nav, the config);
    • maps files to pages for Next, SvelteKit, Remix, Nuxt, Astro and plain HTML;
    • lists files it can't map for the agent to trace;
    • gives the command to run next.
  • New crawl --only=<paths|globs>: shoots just those pages and copies every other page's shots from the last finished run as hard links, so each run still covers the whole site. A page the last run can't cover is shot anyway, and copied shots record the run and commit they came from.
  • Skill and /visualice: new update-mode.md flow (run changes, trace the pages, ask whether to rerun those or everything, then run it).
  • Viewer: an updated tag on reshot pages, copied-shot details in the panel, and Compare with another version side by side.

Update notice

  • An installed CLI checks npm at most once a day, in the background, and says on stderr when a newer version is out, with the update commands. The skill passes it on to the user.
  • visualice serve shows the same news as a banner across the top of the viewer, with the update steps and copy buttons. It comes from the CLI's cached check via /update.json, so the viewer never contacts npm. Dismissing it hides it until the next version, and exports never show it.
  • Off with --quiet, in CI, in a source checkout, or with VISUALICE_NO_UPDATE_CHECK=1.
  • The README explains how to turn on plugin auto-update, which is off by default for third-party marketplaces.

Hardening (from code and security review)

  • A section layout maps to its section, not the whole site.
  • --config is hashed consistently.
  • A cut-short list of uncommitted files gives full.
  • A renamed file counts once.
  • Suggested globs are quoted.
  • New components are never skipped on copied pages.
  • Missing old files mean a page is reshot instead of the run failing.
  • --only paths aren't saved to the routes file, and a 404 one is dropped.
  • Shot paths from an old run must stay inside the run folder.
  • Windows: repository paths are matched through 8.3 short names (found by this PR's first CI run), so the routes file isn't counted as a change.

Tests

  • 29+ new unit tests (changes, source, carry, update-check).
  • Integration: partial.test.ts (full crawl, then --only) and update-flow.test.ts (the real CLI in a git repo: crawl → changes none → page edits give partial → suggested --only run → none → CSS edit gives full).
  • Locally: 545/545 unit, 82/82 integration.

After merge

Release 0.2.0: bump the version and plugin pins, then tag v0.2.0. Then npm deprecate visualice@0.1.1 with an update message, so new 0.1.1 installs see it.

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