Skip to content

migrate-css: catch pg- classes it was missing - #47

Merged
czue merged 3 commits into
mainfrom
css-cleanup
Oct 6, 2026
Merged

czue merged 3 commits into
mainfrom
css-cleanup

Conversation

@czue

@czue czue commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Follow-up to a report that migrate-css missed some pg- leftovers from 2026.9. Most of those leftovers are in Pegasus itself and will be fixed there. This PR closes the gaps in the tool's own coverage.

  • Scan .py files. Pegasus has pg- classes in Python code too, e.g. HTML strings in tailwind_form_tags.py and form widget attrs.
  • Search frontend/ by default (the standalone React frontend), and skip node_modules everywhere so vendored code is never walked or rewritten.
  • Separate report for hand-migration classes. Classes like pg-select are defined in tailwind.css with nested rules instead of a single @apply, so they can't be mapped automatically. They used to be listed as "no mapping", which was misleading. They now get their own "migrate by hand" group.

Tested with new tests in tests/test_migrate_css.py, and with a dry run against the Pegasus template source.

🤖 Generated with Claude Code

czue and others added 3 commits October 6, 2026 10:59
Pegasus has pg- classes in Python code too (template tag HTML strings,
form widget attrs), which the tool was silently skipping.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pegasus's standalone React frontend has pg- classes too. Since frontend/
has its own node_modules, prune it (anywhere) so we don't walk or rewrite
vendored code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Classes like pg-select are defined in tailwind.css but with nested rules
rather than a single @apply, so they can't be auto-mapped. Previously they
were reported as having "no mapping", which was misleading. Report them
separately so users know to migrate them by hand.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@czue
czue merged commit b54a2eb into main Oct 6, 2026
10 checks passed
@czue
czue deleted the css-cleanup branch October 6, 2026 09:21
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