Skip to content

feat(sync): Phase 1 porter workflow + enriched icon/color maps - #67

Closed
IgorShevchik wants to merge 2 commits into
mainfrom
claude/sync-phase1-porter
Closed

feat(sync): Phase 1 porter workflow + enriched icon/color maps#67
IgorShevchik wants to merge 2 commits into
mainfrom
claude/sync-phase1-porter

Conversation

@IgorShevchik

Copy link
Copy Markdown
Collaborator

Summary

Phase 1 of the nuxt/ui → b24ui sync pipeline (see .sync/PLAN.md). Adds the manual porter workflow plus the maps it relies on. Nothing runs automatically — the workflow is workflow_dispatch only and does not advance the ledger cursor.

What's included

.github/workflows/sync-porter.yml — ports ONE upstream commit:

  1. Validate the SHA (^[0-9a-f]{40}$).
  2. Fetch the nuxt/ui commit, write its diff to a file (hard-fail if the SHA is gone — force-push guard).
  3. Branch sync/nuxt-<short> off main (deletes any abandoned branch first).
  4. Run Claude (anthropics/claude-code-action@v1) — it reads .sync/PORTING.md (rules) and the untrusted diff file, and reproduces the change under src/ only. Tools limited to Read,Edit,Write,Grep,Glob (no Bash → it can't run git/secrets).
  5. Scope guard — fail if anything outside src//test//.sync/log/ changed.
  6. Security gate — new v-html/innerHTMLsecurity-review-required label.
  7. No-op detection — docs/deps/infra commits write a one-line rationale to .sync/log/<sha>.md instead.
  8. Gates in ci.yml order: dev:prepare → lint → typecheck → test run -u → test run → build.
  9. Commit (Upstream: nuxt/ui@<sha> trailer) and open a PR labelled nuxt-sync with an <!-- upstream-sha --> footer.

Maps (now grounded, not stubs):

  • icon-map.json — 33 literal i-lucide-*b24-icons entries, verified against src/runtime/dictionary/icons.ts.
  • color-map.json — nuxt tokens → air-*, verified against src/theme/*.ts.

PORTING.md — documents the key insight: b24ui shares nuxt/ui's semantic icon keys (icons.chevronDown, …), so most icon references port 1:1; the map is only the fallback for hardcoded literals.

Before this can actually run (blockers)

Out of scope

  • Phase 2 (dispatcher/queue) and Phase 3 (cursor advance) — later milestones.

https://claude.ai/code/session_01Qz7EXMncvEGiCj4WbmYgJo


Generated by Claude Code

claude added 2 commits June 5, 2026 14:06
- .github/workflows/sync-porter.yml: manual (workflow_dispatch) porter that
  ports ONE nuxt/ui commit via Claude, with SHA validation, untrusted-diff
  isolation, a src/-only scope guard, a v-html security gate, no-op detection,
  the full ci gate chain, and PR creation. Experimental; needs ANTHROPIC_API_KEY;
  does not advance the cursor.
- icon-map.json: grounded literal lucide -> b24-icons map (verified against
  src/runtime/dictionary/icons.ts).
- color-map.json: nuxt tokens -> air-* (verified against src/theme).
- PORTING.md: document that the semantic icons.<key> interface is shared, so
  most icon references port 1:1 and the map is only for hardcoded literals.
Switch the porter's Claude auth from anthropic_api_key to
claude_code_oauth_token (Pro/Max subscription, via `claude setup-token`), and
add a max_turns workflow input so trial runs can be capped lower.

Copy link
Copy Markdown
Collaborator Author

Closing: the sync is manual by decision, so sync-porter.yml will not land. #377 removes the rest of the automation — .sync/PLAN.md, .sync/RUNBOOK.md, the sync_enabled kill-switch and the never-written stats block — and writes the manual procedure into PORTING.md §6 in their place.

Recording what is in this branch that the workflow file is not, so it is not lost:

  1. An icons note for PORTING.md §1. b24ui shares nuxt/ui's semantic icon keys (src/runtime/dictionary/icons.ts), so appConfig.ui.icons.<key> ports unchanged; icon-map.json is only the fallback for hardcoded i-lucide-* literals. That distinction is worth having in the guide regardless of how ports are driven.
  2. icon-map.json — ~31 added entries and 5 corrections (i-lucide-checkCheckLIcon rather than CheckIcon, chevron-downChevronDownLIcon rather than ChevronDownSIcon, minusMinus30Icon, xCrossMIcon).
  3. color-map.json — the warning correction. That one is already fixed in chore(sync): make the manual sync the only sync #377: the committed map pointed warning at air-primary-alert, the same token as error, so it was telling porters the two upstream colors are interchangeable.

Items 1 and 2 are not carried over yet. Those values were written in June against an older @bitrix24/b24icons-vue and each needs checking against the installed package before it can be trusted, so folding them into a removal PR would have mixed verified deletions with unverified additions. They are listed in #377's description as an open follow-up — happy to verify and land them as their own PR.

The branch stays, so nothing here is unrecoverable.


Generated by Claude Code

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.

2 participants