Skip to content

Feat/setup composite actions#11

Merged
Kripu77 merged 11 commits intomainfrom
feat/setup-composite-actions
Feb 22, 2026
Merged

Feat/setup composite actions#11
Kripu77 merged 11 commits intomainfrom
feat/setup-composite-actions

Conversation

@Kripu77
Copy link
Copy Markdown
Owner

@Kripu77 Kripu77 commented Feb 22, 2026

Summary by CodeRabbit

  • New Features

    • Added file utilities package for saving, loading, and exporting boards (SVG, PNG, JPG)
    • Added automated coverage reporting on pull requests with summarized comments and downloadable reports
  • Documentation

    • Updated project docs to reflect new workspace structure and public API exports
  • Chores

    • Reorganized CI into lint, typecheck, test, and build jobs; added tooling setup and cache improvements

… Separate linting, type checking, testing, and building into distinct jobs, utilizing a custom setup action for Bun. Remove redundant steps and enhance coverage reporting integration.
…on description. Remove redundant checkout step from the Bun action for improved clarity.
…ing, and testing jobs for improved execution order.
…ctly importing the findBotComment function, enhancing clarity and maintainability.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 22, 2026

❌ Test Results

Metric Coverage
Lines 0%
Functions 3.81%
Branches 4.85%
Statements 26.7%
Average 8.8%

📦 Download Coverage Report

How to view coverage report
  1. Download the coverage artifact from the link above
  2. Extract the ZIP file
  3. Open index.html in your browser

Commit: 6414f0802aa97e28275bdf30a5ba0686f4b6318d

@Kripu77 Kripu77 closed this Feb 22, 2026
@Kripu77 Kripu77 reopened this Feb 22, 2026
…er components to include explicit type annotations for event parameters, enhancing type safety and code clarity. Update CI workflow to remove redundant dependency installation step in Bun setup action.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 22, 2026

📝 Walkthrough

Walkthrough

Adds a GitHub Actions coverage-report composite action and summary script, a setup-bun composite action, refactors CI into lint/typecheck/test/build jobs, updates docs to add a Bun workspace package @thinkix/file-utils, and adds explicit TypeScript event parameter annotations in several React components.

Changes

Cohort / File(s) Summary
GitHub Actions: coverage report
.github/actions/coverage-report/action.yml, .github/actions/coverage-report/src/comment.js
New composite action uploads coverage artifact, runs a local comment generator, and posts/updates a Markdown coverage comment on PRs (creates comment body, finds bot comment by marker).
Coverage summary script
.github/scripts/coverage-summary.sh
New Bash script parses coverage/coverage-summary.json, extracts percentages, computes a one-decimal average, and writes metrics to GITHUB_OUTPUT; falls back to zeros if file missing.
GitHub Actions: setup Bun
.github/actions/setup-bun/action.yml
New composite action to install Bun (configurable version), cache Bun and node_modules by OS+lockfile key, and run bun install --frozen-lockfile.
CI workflow refactor
.github/workflows/ci.yml
Replaces a single CI job with parallel lint, typecheck, test jobs and a dependent build job; test uses the coverage-report action instead of inlined coverage/comment steps.
Documentation & workspace
CLAUDE.md
Updates docs to Bun workspaces, adds new public package @thinkix/file-utils (file I/O, board export, validation, types), reorganizes workspace and plugin descriptions, and adjusts examples/commands.
Type annotations in UI
features/storage/components/BoardSwitcher.tsx, features/toolbar/components/BoardToolbar.tsx, packages/ui/src/components/ui/color-picker.tsx, next-env.d.ts
Adds explicit event parameter types (e.g., React.MouseEvent, React.PointerEvent, Event) to handlers; updates Next route types import path to ./.next/dev/types/routes.d.ts.

Sequence Diagram

sequenceDiagram
    participant CI as CI Workflow
    participant Test as Test Job
    participant Coverage as coverage-report Action
    participant Script as coverage-summary.sh
    participant Comment as comment.js
    participant GitHub as GitHub API
    participant Artifact as Artifact Storage

    CI->>Test: run tests (bun run test:coverage)
    Test-->>Coverage: provide coverage/ directory & run action
    Coverage->>Artifact: upload coverage-report-${{ github.run_id }}
    Coverage->>Script: execute coverage-summary.sh
    Script->>Script: read coverage-summary.json and compute metrics
    Script-->>Coverage: return metrics (lines, functions, branches, statements, average)
    Coverage->>Comment: call createCoverageComment(metrics, sha, runId, repo)
    Comment-->>Coverage: return Markdown body
    Coverage->>GitHub: list PR comments
    GitHub-->>Coverage: return comments
    Coverage->>Comment: call findBotComment(comments)
    Comment-->>Coverage: return matching comment or undefined
    Coverage->>GitHub: create or update PR comment with Markdown body
    GitHub-->>Coverage: respond success
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I hopped through CI and stored the trace,
Coverage baked and posted in place.
Bun sped installs, artifacts flew,
Docs grew a package—fresh and new.
A tiny rabbit cheers your build race! 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Feat/setup composite actions' accurately reflects the primary changes, which introduce new GitHub Actions composite action files (coverage-report and setup-bun) and supporting infrastructure.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/setup-composite-actions

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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

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 the current code and only fix it if needed.

Inline comments:
In `@CLAUDE.md`:
- Around line 227-239: The fenced code block in CLAUDE.md (the directory tree
snippet) is missing a language identifier causing MD040; update the opening
fence to include a language such as text (e.g., change "```" to "```text") so
the block becomes a plain-text code fence and leave the closing fence unchanged.
- Around line 253-266: Add the missing language identifier to the ASCII art
fenced code block in CLAUDE.md by changing the opening triple-backtick from ```
to ```text so markdownlint MD040 is satisfied (i.e., locate the fenced block
that contains the ASCII pipeline diagram and replace its opening fence with
```text and keep the closing fence as ```).

Comment thread CLAUDE.md Outdated
Comment thread CLAUDE.md Outdated
…Actions workflow. Modify import path in next-env.d.ts to reference the development directory for routes, ensuring accurate type definitions.
… sections, enhancing clarity in documentation.
@Kripu77 Kripu77 merged commit 8f85ee5 into main Feb 22, 2026
5 of 6 checks passed
@Kripu77 Kripu77 deleted the feat/setup-composite-actions branch February 22, 2026 08:24
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@next-env.d.ts`:
- Line 3: next-env.d.ts has been manually edited to import
"./.next/dev/types/routes.d.ts", which breaks production builds; revert any
manual changes to next-env.d.ts (let Next.js regenerate it) and update your
TypeScript config so both route type paths are included by adding ".next/types"
and ".next/dev/types" to the tsconfig "include" array (ensure you modify the
tsconfig.json, not next-env.d.ts), then delete the .next folder and rerun the
build so Next.js emits the correct types and recreates next-env.d.ts.

Comment thread next-env.d.ts
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