Skip to content

fix(render): resolve a relative stylesheet root before comparing it - #532

Merged
sebyx07 merged 1 commit into
mainfrom
fix/render-stylesheet-relative-root
Sep 25, 2026
Merged

sebyx07 merged 1 commit into
mainfrom
fix/render-stylesheet-relative-root

Conversation

@sebyx07

@sebyx07 sebyx07 commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

CodeRabbit found this in its review of #528, and it checks out. loadApp('.') run from /app names a relative root. The Bun plugin hands the loader absolute paths, and no absolute path starts with a relative root, so classification fell back to reading the absolute path and the leading /app/ segment won again.

setStylesheetRoot now resolves the root against the working directory. A new test in module-loader.test.ts names a relative root app and failed before the fix.

bun run verify: 14/20 passed, 6 skipped.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed stylesheet classification when the stylesheet root is specified as a relative path.

loadApp('.') from /app named a relative root, which is a prefix of no absolute
path the Bun plugin hands the loader, so classification fell back to the
absolute path and the /app/ segment won again. Found in review of #528.

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

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: developerz-ai/ultimate/.coderabbit.yml

Review profile: ASSERTIVE

Plan: Essentials

Run ID: d992bb56-c710-411c-94a2-02d6db5946a1

📥 Commits

Reviewing files that changed from the base of the PR and between 3b0cf59 and be732c3.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • packages/render/src/module-loader.test.ts
  • packages/render/src/module-loader.ts

Included review availability: 0 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.


📝 Walkthrough

Walkthrough

setStylesheetRoot now resolves defined roots against the working directory before reclassifying registered stylesheets. A test checks classification with a relative root, and the changelog records the fix.

Changes

Stylesheet root resolution

Layer / File(s) Summary
Resolve and verify stylesheet roots
packages/render/src/module-loader.ts, packages/render/src/module-loader.test.ts, CHANGELOG.md
setStylesheetRoot resolves defined roots against the working directory and then reclassifies registered stylesheets. A test checks that a stylesheet under the resolved root is classified as site. The changelog records this behavior.

Priority: ⬇️ Low

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

Change: Bug fix · Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to be732

Relative app roots now classify absolute stylesheet paths as intended. No actionable merge-blocking risk was identified.

🚥 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 and concisely describes the main change: resolving a relative stylesheet root before path comparison.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (1 skipped: 1 …
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 docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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

@sebyx07
sebyx07 merged commit b21053e into main Sep 25, 2026
9 checks passed
@sebyx07
sebyx07 deleted the fix/render-stylesheet-relative-root branch September 25, 2026 02:45
@sebyx07 sebyx07 mentioned this pull request Sep 25, 2026
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