Skip to content

fix(wbfy): trim redundant comments from generated files - #1246

Merged
exKAZUu merged 5 commits into
mainfrom
refactor/trim-generated-comments
Aug 15, 2026
Merged

fix(wbfy): trim redundant comments from generated files#1246
exKAZUu merged 5 commits into
mainfrom
refactor/trim-generated-comments

Conversation

@exKAZUu

@exKAZUu exKAZUu commented Aug 15, 2026

Copy link
Copy Markdown
Member

Customer Summary

  • wbfy no longer adds the explanatory comment about WB_ENV to a repository's fnox.toml, and it removes the comment previous versions had written there.
  • Nothing else changes: the WB_ENV / NEXT_PUBLIC_WB_ENV values themselves, other comments, and the file's formatting stay exactly as they are.

Technical Summary

  • insertWbEnvIntoFnoxToml (packages/wbfy/src/generators/wbEnv.ts) no longer inserts wbEnvComment, and the previous "rewrite the outdated wording" migration became a removal: any line matching /^# CI sets WB_ENV as a process env var, which wins over fnox[^\n]*\n/mu is deleted, so every wording variant earlier versions wrote converges on a comment-free section.
  • The pattern is anchored to the full wording wbfy actually wrote (not just the opening words), so a project-authored comment starting similarly survives. The missing g flag is sufficient because prior versions only ever wrote the comment once, for the development mode.
  • The JSDoc now states the comment-preservation exception.
  • Tests: the three obsolete comment-migration tests were replaced by one that asserts no comment is written and a legacy one is removed without touching values, plus a new test covering insertion of only the missing key into a section that already defines the other one.
  • This branch originally also trimmed the generated lefthook.yml, oxlint.config.ts and bunfig.toml comments; fix(wbfy): stop emitting explanatory comments into generated files #1245 landed that cleanup on main first, so main was merged and its wording kept, leaving only the fnox.toml part here.

Why

  • The removed comment explained wb's own WB_ENV precedence rules inside a file of a target repository — in-house tool specifications must not be documented outside the tool's own package, and the rationale now lives in wbfy's sources.

Testing

  • bun run verify-full (install, lint/format, tsc --noEmit, all tests) — passed after the merge with main.
  • All GitHub Actions workflows for this PR passed.

Move the rationale for the generated hooks and configs into wbfy's own sources
and stop writing it into target repositories: the duplicated `{staged_files}`
notes, the bun.lock normalization walkthrough, the oxlint managed-block notes,
the WB_ENV precedence note in fnox.toml (also removed from existing files) and
the globalStore note in bunfig.toml.

Co-authored-by: WillBooster (Claude Code) <agent@willbooster.com>
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

exKAZUu and others added 4 commits August 15, 2026 23:18
Also narrow the legacy WB_ENV comment pattern to the wording wbfy actually
wrote, so a project-authored comment with the same opening words survives.

Co-authored-by: WillBooster (Claude Code) <agent@willbooster.com>
…ing section

Co-authored-by: WillBooster (Claude Code) <agent@willbooster.com>
Co-authored-by: WillBooster (Claude Code) <agent@willbooster.com>
Take main's wording for the comment cleanup landed by #1245; this branch keeps
the fnox.toml WB_ENV comment removal and its tests.

Co-authored-by: WillBooster (Claude Code) <agent@willbooster.com>
@exKAZUu exKAZUu changed the title refactor(wbfy): trim redundant comments from generated files fix(wbfy): stop writing the WB_ENV explanation into fnox.toml Aug 15, 2026
@exKAZUu exKAZUu self-assigned this Aug 15, 2026
@exKAZUu exKAZUu changed the title fix(wbfy): stop writing the WB_ENV explanation into fnox.toml fix(wbfy): trim redundant comments from generated files Aug 15, 2026
@exKAZUu
exKAZUu merged commit b0326fa into main Aug 15, 2026
7 checks passed
@exKAZUu
exKAZUu deleted the refactor/trim-generated-comments branch August 15, 2026 14:46
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