Skip to content

feat: add no comment flow - #951

Merged
isaque-bock-azion merged 4 commits into
mainfrom
refactor/comment-discipline
Sep 3, 2026
Merged

isaque-bock-azion merged 4 commits into
mainfrom
refactor/comment-discipline

Conversation

@isaque-bock-azion

@isaque-bock-azion isaque-bock-azion commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Adds two new authoring-standard checks — verbose-comment-block (blocks comment blocks longer than 5 lines) and comment-heavy-file (blocks files that are ≥20% prose comments) — enforcing comments.md: comments should be rare and objective, not narration.
  • Strips existing over-commented code across the package (composables, eslint-plugin rules, MCP server/queries, stylelint config, vite plugin) down to the objective one-liners the rule allows.
  • Freezes remaining pre-existing comment debt into authoring-baseline.json so the ratchet lands without forcing a full-repo rewrite in this PR; new code is held to the rule immediately.
  • Fixes unrelated CI breakage found while stabilizing the branch: use-controllable was a plain .js file with no generics, which made vue-tsc reject every useControllable<T>(...) call site (accordion, dropdown, dialog, drawer, popover, tooltip). Converted it to typed TypeScript (use-controllable.ts + index.ts) and added the missing type argument in dialog.vue / drawer.vue.

How to test

  1. pnpm --filter @aziontech/webkit run authoring — construction-standard ratchet passes with 0 new violations.
  2. pnpm --filter @aziontech/webkit run type-check — vue-tsc --noEmit passes (previously failed with 10 errors across accordion/dropdown/dialog/drawer/popover/tooltip).
  3. pnpm --filter @aziontech/webkit run test:toolkit — the new comment-heavy-file / verbose-comment-block checks are covered.
  4. pnpm run governance — full local gate (lint, stylelint, format, type-check, type-coverage, audit) is green.

Notes

None — no breaking change, no new dependency. authoring-baseline.json records pre-existing debt only; it does not grandfather anything introduced by this PR.

- Convert use-controllable to TypeScript with proper generics
  (was a plain .js file, causing type-check errors across 5 consumers)
- Add type argument to useControllable calls in dialog/drawer
- Fix prettier formatting in rules.test.mjs
- Freeze pre-existing comment-discipline debt into authoring-baseline.json
@isaque-bock-azion isaque-bock-azion changed the title feat: add no comment flow feat: add no comment flow Sep 1, 2026
@isaque-bock-azion
isaque-bock-azion merged commit b7f0201 into main Sep 3, 2026
23 checks passed
@isaque-bock-azion
isaque-bock-azion deleted the refactor/comment-discipline branch September 3, 2026 13:50
@github-actions github-actions Bot mentioned this pull request Sep 8, 2026
gabriel-lisboa-azion added a commit that referenced this pull request Sep 21, 2026
demo/vue-sample had drifted 540 ahead / 31 behind main while most of its
webkit work was reviewed and landed upstream (#941 command-menu, #942
GlobalHeader placements, #943 NavigationMenu, #952 Menu, #960 sidebar
collapse, #973 floating-panel placement, #975 paginator, #977 templates
exports, #921 amount ladder), after which main swept comments (#951) and
reworked the CLI onto a derived bundle (#968/#970).

Main is the source for everything the two share. Of the 28 conflicted
source files, 17 differed from main only in comments — their code was
byte-identical — and 6 more were genuinely newer on main, so all 23 take
main verbatim, including the use-placement TypeScript rewrite that
replaces the old index.js.

Three carve-outs keep demo work main does not have yet:

- sidebar: main's CSS-driven collapse is the base; the `side` axis is
  re-applied on top of it as data-[side=end] variants rather than the JS
  edge map it used to be, and the drag sign moves into the rail
  composable. The one test that asserted the removed inline transform now
  asserts the panel's published edge, since the direction is CSS the
  unstyled test env cannot see.
- theme: texts.data.js keeps demo's 13 extra text-wrap and 10 extra
  tracking declarations (PR #982, in flight). Both sides carry the same
  34 entries, so an entry count would not have caught the loss.
- doc-prose keeps its chrome-padding fix (PR #981, in flight).

catalog.json, authoring-baseline.json, the theme dist and the lockfile
are regenerated rather than hand-resolved; the 13 conflicted visual
baselines take main's and are regenerated from CI next.

Verified: every file main touched is byte-identical to main except the
22 accounted for above; 2364 browser tests, 179 toolkit tests, lint,
vue-tsc, 99.98% type coverage, both ratchets, the Storybook build and
the webkit-sample build all pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants