Skip to content

(Claude) Reformat JS, CSS, JSON and YAML with oxfmt - #357

Merged
cboos merged 2 commits into
mainfrom
dev/oxfmt-reformat
Oct 9, 2026
Merged

cboos merged 2 commits into
mainfrom
dev/oxfmt-reformat

Conversation

@cboos

@cboos cboos commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

The reformat planned in #356: the output of just fmt-js, with nothing edited by hand, and the HTML snapshots regenerated to match.

What changes

format files lines
JavaScript 10 +3004/−2486
CSS 13 +515/−162
JSON 2 +2/−2
YAML 2 +92/−92
test_snapshot_html.ambr 1 +13530/−9304

These are the figures #356 announced. Most of the JavaScript churn is indentation: the component files were indented to sit inside the templates' <script> blocks, and oxfmt starts them at column 0. git diff -w leaves +745/−227. The four component files that hold Jinja were formatted through scripts/fmt_templates.py, and their Jinja lines are unchanged.

Meaning is unchanged

Each file was compared between main and this branch:

  • JavaScript: all 10 files parse (acorn) to equal syntax trees, ignoring positions. The Jinja lines are masked identically on both sides and compared verbatim.
  • CSS: equal once whitespace, quote style, hex case and leading zeros are normalized.
  • YAML: yaml.safe_load gives equal data, and the comment lines and anchors are unchanged.
  • JSON: parses to equal data. .vscode/settings.json lost a trailing comma, which VS Code's JSONC never needed.

Each comparison was also checked against a deliberate one-character change in its format, which it flagged.

In the snapshots, all 16 HTML blocks change, with the same names, and every change is inside <style> or <script>: strip those and each block equals its previous version. The Markdown snapshot is untouched.

just fmt-check and just lint-js pass, and so does just ci.

Next

A follow-up PR adds this PR's merge commit to .git-blame-ignore-revs, so git blame looks through it, and runs just fmt-check in just ci and on CI's primary job. It needs this PR's SHA on main, so it comes after the merge.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Reformatted existing styles, scripts, and workflow configuration. No user-visible behavior changes.

cboos and others added 2 commits October 8, 2026 20:33
The output of `just fmt-js` (oxfmt 0.69.0 with .oxfmtrc.json, plus
scripts/fmt_templates.py for the component files holding Jinja), and
nothing else: no hand edits. Meaning is unchanged: the JS parses to
equal ASTs, the CSS is equal once whitespace, quote style, hex case and
leading zeros are normalized, and the YAML and JSON load to equal data.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`just update-snapshot` after the reformat. All 16 HTML blocks change,
with the same names, and every change is inside <style> or <script>:
with those stripped, each block equals its previous version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6868e1a3-c9c0-4603-bac3-a288b86ffa8b
📥 Commits

Reviewing files that changed from the base of the PR and between 2bf660e and 33a1bab.

📒 Files selected for processing (28)
  • .claude/settings.json
  • .github/workflows/ci.yml
  • .github/workflows/docs.yml
  • .vscode/settings.json
  • claude_code_log/html/templates/components/filter_styles.css
  • claude_code_log/html/templates/components/global_styles.css
  • claude_code_log/html/templates/components/image_zoom.js
  • claude_code_log/html/templates/components/live_update.js
  • claude_code_log/html/templates/components/message_styles.css
  • claude_code_log/html/templates/components/minimal/components.css
  • claude_code_log/html/templates/components/minimal/dag.css
  • claude_code_log/html/templates/components/minimal/layout.css
  • claude_code_log/html/templates/components/minimal/minimal.js
  • claude_code_log/html/templates/components/minimal/minimal_dag.js
  • claude_code_log/html/templates/components/minimal/pages.css
  • claude_code_log/html/templates/components/minimal/pages.js
  • claude_code_log/html/templates/components/minimal/scheme.js
  • claude_code_log/html/templates/components/minimal/scheme_init.js
  • claude_code_log/html/templates/components/minimal/search_rows.js
  • claude_code_log/html/templates/components/minimal/theme_init.js
  • claude_code_log/html/templates/components/page_nav_styles.css
  • claude_code_log/html/templates/components/project_card_styles.css
  • claude_code_log/html/templates/components/search_styles.css
  • claude_code_log/html/templates/components/session_nav_styles.css
  • claude_code_log/html/templates/components/timeline_styles.css
  • claude_code_log/html/templates/components/timezone_converter.js
  • claude_code_log/html/templates/components/todo_styles.css
  • test/__snapshots__/test_snapshot_html.ambr

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The pull request reformats workflow configuration and HTML template CSS and JavaScript. The supplied summaries report no runtime behavior changes.

Changes

Formatting normalization

Layer / File(s) Summary
Workflow and editor configuration formatting
.claude/settings.json, .github/workflows/*.yml, .vscode/settings.json
Workflow branch filters use compact list formatting, and CI steps are indented beneath steps. The editor settings trailing comma is removed. Commands, conditions, branch targets, and configuration values are unchanged.
Shared template component formatting
claude_code_log/html/templates/components/{filter_styles.css,global_styles.css,image_zoom.js,live_update.js,message_styles.css,page_nav_styles.css,project_card_styles.css,search_styles.css,session_nav_styles.css,timeline_styles.css,timezone_converter.js,todo_styles.css}
Shared component CSS and JavaScript are reformatted. Styling values, selector behavior, and runtime behavior remain unchanged.
Minimal-theme formatting
claude_code_log/html/templates/components/minimal/*
Minimal-theme CSS and JavaScript are reformatted. Selector conditions, style values, and runtime behavior remain unchanged.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Refactor

Suggested reviewers: daaain

Merge Risk: ⚪ Minimal · up to 33a1b

The formatting changes appear mergeable after normal checks; no actionable issue remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 30.43% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 46 functions across 9 files. (17 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary change: reformatting JavaScript, CSS, JSON, and YAML with oxfmt.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 30.43% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 46 functions across 9 files. (17 skipped: 17 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

🔧 Biome (2.5.14)
claude_code_log/html/templates/components/minimal/minimal.js

File contains syntax errors that prevent linting: Line 13: Expected a statement but instead found '% include 'components/minimal/scheme.js' %'.

claude_code_log/html/templates/components/minimal/pages.js

File contains syntax errors that prevent linting: Line 7: Expected a statement but instead found '% include 'components/minimal/scheme.js' %'.

claude_code_log/html/templates/components/minimal/theme_init.js

File contains syntax errors that prevent linting: Line 1: Expected a statement but instead found '% include 'components/minimal/scheme_init.js' %'.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cboos
cboos merged commit 8ae38e5 into main Oct 9, 2026
17 checks passed
cboos added a commit that referenced this pull request Oct 9, 2026
`just fmt-check` joins `just ci`, and CI runs the same two checks on
the primary job, after lint-js; both run, so every unformatted file is
listed. `.git-blame-ignore-revs` names the reformat commit (#357), and
CONTRIBUTING says how to point `git blame` at it.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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