Skip to content

Add comment-fmt, wire up CI check - #30

Merged
Vilos92 merged 9 commits into
mainfrom
chore/add-comment-fmt
Aug 2, 2026
Merged

Add comment-fmt, wire up CI check#30
Vilos92 merged 9 commits into
mainfrom
chore/add-comment-fmt

Conversation

@Vilos92

@Vilos92 Vilos92 commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds comment-fmt as a dev dependency and a CI job (comment-fmt) that runs comment-fmt --check.
  • No reformat yet, no pre-commit hook wiring yet. This first commit is expected to fail CI, confirming the check actually catches something before the fix lands. Follow-up commit reformats and wires up a pre-commit hook (this repo has no existing hook mechanism, so that means adding simple-git-hooks + lint-staged), at which point CI goes green.

Test plan

  • Confirmed locally: bun run comment-fmt:check fails, listing 5 files
  • Confirm CI's new comment-fmt job fails on this PR
  • Follow-up commit reformats + wires the pre-commit hook, confirm CI goes green

Summary by CodeRabbit

  • Chores

    • Added automated comment-formatting checks to continuous integration.
    • Added pre-commit formatting safeguards for more consistent code quality.
    • Updated development tooling while preserving existing dependency installation policies.
  • Documentation

    • Reformatted internal documentation comments for improved readability and consistency.
    • No application behavior or user-facing functionality changed.

Adds comment-fmt as a dev dependency and a CI job that runs
--check, before any reformat. Expected to fail until the follow-up
--write pass lands. Also exempts comment-fmt from bunfig.toml's
minimumReleaseAge policy, self-authored and self-published, not the
kind of third-party dependency that policy guards against, and
without it CI's install step fails immediately on a fresh release.
@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The repository reformats source comments, adds comment-fmt tooling, configures local formatting hooks, permits immediate package installation, and runs the formatter check in CI.

Changes

Comment format enforcement

Layer / File(s) Summary
Formatter command and install policy
package.json, bunfig.toml
The project adds the comment-fmt dependency and check script. Pre-commit hooks format TypeScript files. Bun excludes comment-fmt from the minimum release-age policy.
Source comment formatting
src/components/TaskList/taskList.css.ts, src/lib/keyboard/*.ts, src/lib/taskLevel.ts, src/views/WorkspacesLayout.tsx
Documentation comments use multiline formatting. Runtime behavior and API signatures remain unchanged.
Continuous integration validation
.github/workflows/continuous-integration.yaml
A new CI job installs dependencies and runs bun run comment-fmt:check.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

  • Vilos92/gdex#29: Adds related comment-formatting changes.
  • Vilos92/gdex#28: Contains related comment-formatting changes in taskListNavigation.ts.
  • Vilos92/gdex#17: Also modifies package.json to add development tooling and scripts.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: adding comment-fmt and running its CI check.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/add-comment-fmt

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/continuous-integration.yaml:
- Around line 41-42: Remove or defer the “Comment format” workflow step running
bun run comment-fmt:check until the formatter baseline is clean; alternatively,
format all five affected files before enabling it. Ensure the CI job does not
run as a known-failing check.

In `@bunfig.toml`:
- Around line 6-9: Restrict the minimumReleaseAgeExcludes entry to
comment-fmt@0.1.4 instead of all versions, and remove that exemption once 0.1.4
has passed the seven-day release window. Also pin the Bun version used by CI
rather than relying on the setup action default.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2ac343ce-6aef-40a8-9770-d03c718333d3

📥 Commits

Reviewing files that changed from the base of the PR and between f7ddc3e and 60bfb25.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (3)
  • .github/workflows/continuous-integration.yaml
  • bunfig.toml
  • package.json

Comment on lines +41 to +42
- name: Comment format
run: bun run comment-fmt:check

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Do not add a check that the current PR is known to fail.

The PR leaves five files unformatted, so bun run comment-fmt:check will fail on every run. A required check blocks merging. A non-required check leaves CI red and reduces its signal.

Format the files before enabling this job, or defer the job until the formatter baseline is clean.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/continuous-integration.yaml around lines 41 - 42, Remove
or defer the “Comment format” workflow step running bun run comment-fmt:check
until the formatter baseline is clean; alternatively, format all five affected
files before enabling it. Ensure the CI job does not run as a known-failing
check.

Comment thread bunfig.toml
Comment on lines +6 to +9
# comment-fmt is self-authored and self-published (Vilos92/comment-fmt), not a third-party
# dependency this policy is meant to guard against. Exempted so a fresh release doesn't block
# installing our own tool immediately after publishing it.
minimumReleaseAgeExcludes = ["comment-fmt"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -eu

printf '%s\n' '--- bunfig.toml ---'
cat -n bunfig.toml

printf '%s\n' '--- package.json dependency ---'
rg -n -C 3 '"comment-fmt"' package.json

printf '%s\n' '--- lockfile comment-fmt entries ---'
rg -n -C 5 'comment-fmt|comment_fmt' bun.lock

printf '%s\n' '--- CI Bun references ---'
rg -n -i -C 3 'oven-sh/setup-bun|bun-version|bun install|bunx|minimumReleaseAge|comment-fmt' .github bunfig.toml package.json bun.lock 2>/dev/null || true

printf '%s\n' '--- tracked relevant files ---'
git ls-files bunfig.toml package.json bun.lock '.github/**'

Repository: Vilos92/gdex

Length of output: 6422


🏁 Script executed:

#!/bin/bash
set -eu
cat -n bunfig.toml
rg -n -C 3 '"comment-fmt"' package.json
rg -n -C 5 'comment-fmt|comment_fmt' bun.lock
rg -n -i -C 3 'setup-bun|bun-version|bun install|bunx|minimumReleaseAge|comment-fmt' .github bunfig.toml package.json bun.lock 2>/dev/null || true

Repository: Vilos92/gdex

Length of output: 6068


🌐 Web query:

Bun bunfig minimumReleaseAgeExcludes semantics package name all versions

💡 Result:

In Bun, the minimumReleaseAgeExcludes configuration in bunfig.toml allows you to exempt specific packages from the minimumReleaseAge requirement, which prevents the installation of recently published, potentially unstable, or malicious package versions [1][2]. The minimumReleaseAgeExcludes setting supports the following semantics for package specification: 1. Bare Package Names: Providing an exact package name (e.g., "typescript") exempts all versions of that package from the age gate [1][3]. 2. Pinned Versions (name@version): You can exempt a specific version of a package by using the name@version format (e.g., "typescript@5.4.5"). This allows you to whitelist a vetted, specific version while keeping the age gate active for all other, newer versions of that same package [3]. 3. Wildcard Patterns: You can use wildcard patterns (e.g., "@my-organization/" or "hotfix-") to match multiple packages at once. The * character matches zero or more characters and can be used at the beginning, middle, or end of a pattern [4]. When Bun resolves dependencies, it checks these exclusion entries to determine if a package version should be filtered by the age requirement [3]. If a version is explicitly excluded via a pinned version or falls under a matched wildcard pattern, it bypasses the age restriction and is treated as a valid candidate for installation [3][4]. Existing dependencies locked in bun.lock are not affected by changes to these settings, as the gate only applies to new package resolution [1].

Citations:


🌐 Web query:

oven-sh/setup-bun v2.2.0 bun-version default latest action.yml

💡 Result:

In the oven-sh/setup-bun v2.2.0 GitHub Action, the bun-version input does not have a hardcoded static default value in the action.yml that forces it to always be latest [1][2]. Instead, the action implements dynamic version resolution logic [1][3]. By default, if the bun-version input is not explicitly specified by the user, the action follows this priority order to determine which version to install [1][4]: 1. Package Manager Field: It first checks the package.json file for the packageManager field (e.g., "packageManager": "bun@1.0.25") [1][2]. 2. Engines Field: If packageManager is not found, it checks the package.json file for the engines.bun field [1][2]. 3. Latest: If neither of the above is found, or if a package.json file does not exist, the action defaults to using the latest version [1][4]. Users can also explicitly set the version by providing a value to the bun-version input (e.g., latest, canary, or a specific version like 1.0.0) [1][2].

Citations:


🏁 Script executed:

#!/bin/bash
set -eu

printf '%s\n' '--- Bun setup action and CI context ---'
cat -n .github/actions/install-bun-and-dependencies/action.yaml
printf '%s\n' '--- workflows using the local install action ---'
rg -n -C 5 'install-bun-and-dependencies|permissions:|bun-version|setup-bun' .github/workflows .github/actions
printf '%s\n' '--- lockfile metadata ---'
head -n 45 bun.lock

Repository: Vilos92/gdex

Length of output: 12137


🏁 Script executed:

#!/bin/bash
set -eu

python3 - <<'PY'
import json, re, pathlib

bunfig = pathlib.Path("bunfig.toml").read_text()
package = json.loads(pathlib.Path("package.json").read_text())
lock = json.loads(pathlib.Path("bun.lock").read_text())

age = re.search(r"^\s*minimumReleaseAge\s*=\s*(\d[\d_]*)\s*$", bunfig, re.M)
excludes = re.search(r"^\s*minimumReleaseAgeExcludes\s*=\s*\[(.*?)\]\s*$", bunfig, re.M)
dep = package["devDependencies"]["comment-fmt"]
locked = lock["packages"]["comment-fmt"][0]

print("minimumReleaseAge_seconds =", int(age.group(1).replace("_", "")) if age else None)
print("minimumReleaseAgeExcludes =", excludes.group(1).strip() if excludes else None)
print("package_json_comment_fmt =", dep)
print("bun_lock_comment_fmt =", locked)
print("exact_version_exclusion =", bool(re.search(r'"comment-fmt@\d+\.\d+\.\d+"', excludes.group(1))) if excludes else False)
print("packageManager_field =", package.get("packageManager"))
print("engines_bun_field =", package.get("engines", {}).get("bun"))
print("ci_install_is_frozen =", "bun install --frozen-lockfile" in pathlib.Path(".github/actions/install-bun-and-dependencies/action.yaml").read_text())
print("ci_bun_version_explicit =", bool(re.search(r"bun-version\s*:", pathlib.Path(".github/actions/install-bun-and-dependencies/action.yaml").read_text())))
PY

Repository: Vilos92/gdex

Length of output: 667


🌐 Web query:

site:bun.com/docs/pm/cli/install minimumReleaseAge frozen-lockfile locked dependencies age gate

💡 Result:

The minimumReleaseAge configuration is a security feature primarily associated with the Bun package manager that protects against supply chain attacks by preventing the installation of recently published packages [1]. Key aspects of how this feature functions in conjunction with dependency management include: Minimum Age Requirement: It allows users to set a threshold (in seconds) that package versions must meet based on their publication time to be eligible for installation [1]. Interaction with Frozen Lockfiles: When using a frozen lockfile (via --frozen-lockfile or the equivalent configuration), Bun enforces strict dependency resolution [1]. The minimumReleaseAge filter only impacts new package resolution; packages already present in the existing lockfile are treated as trusted and remain unchanged [1]. Scope: The age gate applies to both direct and transitive dependencies [1]. Stability Check: If the filter blocks versions due to the age gate, Bun performs an additional stability check for rapid bugfix patterns [1]. If it detects multiple versions published in quick succession just outside the age gate, it may automatically extend the filter to select a more mature, older version [1]. Exclusions: Users can explicitly exclude specific packages from this check using the minimumReleaseAgeExcludes configuration [1]. Exact Version Requests: Requests for an exact version (e.g., package@1.1.1) will still respect the age gate but will bypass the automated stability check [1]. The configuration can be set via command-line arguments or through Bun's configuration file (e.g., bunfig.toml) [1]. Example configuration: minimumReleaseAge = 259200 # 3 days in seconds minimumReleaseAgeExcludes = ["@types/node", "typescript"] [1]

Citations:


🏁 Script executed:

#!/bin/bash
set -eu
python3 - <<'PY'
import json, re, pathlib
bunfig = pathlib.Path("bunfig.toml").read_text()
package = json.loads(pathlib.Path("package.json").read_text())
lock = json.loads(pathlib.Path("bun.lock").read_text())
print("minimumReleaseAge:", re.search(r"minimumReleaseAge\s*=\s*(\d[\d_]*)", bunfig).group(1))
print("exclude:", re.search(r"minimumReleaseAgeExcludes\s*=\s*\[(.*?)\]", bunfig).group(1).strip())
print("dependency:", package["devDependencies"]["comment-fmt"])
print("locked:", lock["packages"]["comment-fmt"][0])
print("packageManager:", package.get("packageManager"))
print("engines.bun:", package.get("engines", {}).get("bun"))
action = pathlib.Path(".github/actions/install-bun-and-dependencies/action.yaml").read_text()
print("frozen_lockfile:", "bun install --frozen-lockfile" in action)
print("explicit_bun_version:", bool(re.search(r"bun-version\s*:", action)))
PY

Repository: Vilos92/gdex

Length of output: 667


🏁 Script executed:

#!/bin/bash
set -eu

python3 - <<'PY'
import pathlib, re

bunfig = pathlib.Path("bunfig.toml").read_text()
package = pathlib.Path("package.json").read_text()
lock = pathlib.Path("bun.lock").read_text()
action = pathlib.Path(".github/actions/install-bun-and-dependencies/action.yaml").read_text()

age = re.search(r"^\s*minimumReleaseAge\s*=\s*(\d[\d_]*)\s*$", bunfig, re.M)
excludes = re.search(r"^\s*minimumReleaseAgeExcludes\s*=\s*\[(.*?)\]\s*$", bunfig, re.M)
dep = re.search(r'"comment-fmt"\s*:\s*"([^"]+)"', package)
locked = re.search(r'"comment-fmt":\s*\["comment-fmt@([^"]+)"', lock)

print("minimumReleaseAge_seconds =", int(age.group(1).replace("_", "")) if age else None)
print("minimumReleaseAgeExcludes =", excludes.group(1).strip() if excludes else None)
print("package_json_comment_fmt =", dep.group(1) if dep else None)
print("bun_lock_comment_fmt =", locked.group(1) if locked else None)
print("packageManager_field_present =", bool(re.search(r'"packageManager"\s*:', package)))
print("engines_bun_field_present =", bool(re.search(r'"engines"\s*:\s*\{[^}]*"bun"\s*:', package, re.S)))
print("ci_install_is_frozen =", "bun install --frozen-lockfile" in action)
print("ci_bun_version_explicit =", bool(re.search(r"bun-version\s*:", action)))
PY

Repository: Vilos92/gdex

Length of output: 421


🏁 Script executed:

#!/bin/bash
set -eu
python3 - <<'PY'
import pathlib, re
bunfig = pathlib.Path("bunfig.toml").read_text()
package = pathlib.Path("package.json").read_text()
lock = pathlib.Path("bun.lock").read_text()
action = pathlib.Path(".github/actions/install-bun-and-dependencies/action.yaml").read_text()

for label, pattern, text in [
    ("minimumReleaseAge_seconds", r"^\s*minimumReleaseAge\s*=\s*(\d[\d_]*)\s*$", bunfig),
    ("minimumReleaseAgeExcludes", r"^\s*minimumReleaseAgeExcludes\s*=\s*\[(.*?)\]\s*$", bunfig),
    ("package_json_comment_fmt", r'"comment-fmt"\s*:\s*"([^"]+)"', package),
    ("bun_lock_comment_fmt", r'"comment-fmt":\s*\["comment-fmt@([^"]+)"', lock),
]:
    m = re.search(pattern, text, re.M | re.S)
    print(label, "=", m.group(1).replace("_", "") if m else None)

print("packageManager_field_present =", bool(re.search(r'"packageManager"\s*:', package)))
print("engines_bun_field_present =", bool(re.search(r'"engines"\s*:\s*\{[^}]*"bun"\s*:', package, re.S)))
print("ci_install_is_frozen =", "bun install --frozen-lockfile" in action)
print("ci_bun_version_explicit =", bool(re.search(r"bun-version\s*:", action)))
PY

Repository: Vilos92/gdex

Length of output: 421


Scope the exemption to the bootstrap version.

minimumReleaseAgeExcludes = ["comment-fmt"] exempts every version, while package.json allows future 0.1.x releases. Use ["comment-fmt@0.1.4"], then remove the exemption after 0.1.4 passes the seven-day window. Pin the Bun version because CI currently uses the setup action’s default version.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@bunfig.toml` around lines 6 - 9, Restrict the minimumReleaseAgeExcludes entry
to comment-fmt@0.1.4 instead of all versions, and remove that exemption once
0.1.4 has passed the seven-day release window. Also pin the Bun version used by
CI rather than relying on the setup action default.

Vilos92 added 2 commits August 1, 2026 21:43
Bulk --write pass across 5 files. All plain single-line JSDoc/line
comments expanding to the multi-line starred form, no mangles
(ignore/disable/expect-error/tables/box-drawing untouched).
No existing hook mechanism in this repo. Adds simple-git-hooks (the
installer) plus lint-staged (the staged-file runner, handles partial
staging and re-staging safely). comment-fmt runs last in the
lint-staged pipeline, after biome, since biome re-indents comments as
part of formatting the surrounding code and comment-fmt's width math
depends on the final indentation.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
package.json (1)

57-59: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use the Bun runner in the pre-commit hook.

Replace npx lint-staged with bun x lint-staged to follow the Bun-first package.json requirement.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@package.json` around lines 57 - 59, Update the simple-git-hooks pre-commit
command to invoke lint-staged through the Bun runner, replacing the current npx
invocation with bun x while preserving the existing hook behavior.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@package.json`:
- Around line 57-59: Update the simple-git-hooks pre-commit command to invoke
lint-staged through the Bun runner, replacing the current npx invocation with
bun x while preserving the existing hook behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a8a2653a-21b4-45ff-8a08-b68cc85601cf

📥 Commits

Reviewing files that changed from the base of the PR and between 60bfb25 and 636f997.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (6)
  • package.json
  • src/components/TaskList/taskList.css.ts
  • src/lib/keyboard/scope.ts
  • src/lib/keyboard/taskListNavigation.ts
  • src/lib/taskLevel.ts
  • src/views/WorkspacesLayout.tsx

Vilos92 and others added 6 commits August 1, 2026 22:26
Fixes a case where a @tag's own description stayed at whatever
uneven line breaks it was originally authored with even when the
paragraph right above it needed rewrapping. No source files in this
repo were affected by the bug, so this is a dependency bump only.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W14jepHHRWgvVGxQf7dhMS
0.1.9/0.1.10 only changed --check/--diff's own output formatting;
format()/wrap() reflow logic is unchanged since 0.1.8, so no source
files are affected.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W14jepHHRWgvVGxQf7dhMS
Copied from simple-git-hooks' own generic README example without
adapting it to this repo's Bun-first setup. npx implicitly depends
on npm (or, on this machine, a Vite+-provided shim) being present;
bunx is guaranteed to exist wherever bun already is, which this repo
already requires. --bun forces the invocation through Bun's runtime
rather than deferring to Node via lint-staged's own shebang. Verified
end to end: staged a real change and ran the regenerated hook, same
biome + comment-fmt behavior as before.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W14jepHHRWgvVGxQf7dhMS
@Vilos92
Vilos92 merged commit 6c1524d into main Aug 2, 2026
16 checks passed
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