feat(aurora): add branding slots, appName and pageFooter#929
Conversation
b50d3f4 to
7e42a48
Compare
16a44cd to
8803ba9
Compare
There was a problem hiding this comment.
Pull request overview
Adds a lightweight branding/extensibility layer to @cobaltcore-dev/aurora’s AuroraApp by introducing new slot hooks (logo + footer) and an appName prop, enabling consumers to customize header/footer branding without forking.
Changes:
- Added
appNameto router/app context and render path to replace hardcoded “Aurora” in the main header. - Added new slots:
slots.logo(header) andslots.pageFooter(AppShell footer), plus aSlotoption to disable Shadow DOM per-render. - Updated package docs/changeset and dashboard app template to use
VITE_APP_TITLEfor the HTML<title>.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/aurora/src/client/routes/__root.tsx | Plumbs appName/slots through route context and renders optional pageFooter slot. |
| packages/aurora/src/client/components/Slot.tsx | Adds useShadowDOM toggle to allow slots to render outside Shadow DOM when needed. |
| packages/aurora/src/client/components/navigation/MainNavigation.tsx | Uses appName fallback + supports slots.logo to replace the default SVG logo. |
| packages/aurora/src/client/AuroraApp.tsx | Extends public types/JSDoc to include new slots and appName. |
| packages/aurora/src/client/App.tsx | Passes appName through to router context. |
| packages/aurora/README.md | Documents new appName/slots API and slot usage examples. |
| commitlint.config.mjs | Updates allowed commit scope from aurora-portal to aurora. |
| apps/dashboard/src/client/index.html | Sets HTML title via %VITE_APP_TITLE%. |
| apps/dashboard/.env.example | Adds VITE_APP_TITLE example value. |
| .changeset/branding-slots.md | Declares minor release for branding slots + appName. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Warning Review limit reached
More reviews will be available in 7 minutes and 8 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (12)
📝 WalkthroughWalkthroughAdds ChangesAurora Branding Slot Extensions
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsStopped waiting for pipeline failures after 30000ms. One of your pipelines takes longer than our 30000ms fetch window to run, so review may not consider pipeline-failure results for inline comments if any failures occurred after the fetch window. Increase the timeout if you want to wait longer or run a 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. Comment |
7a26278 to
bd706f6
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
packages/aurora/src/client/App.tsx (1)
21-27: ⚡ Quick winUnify
AppPropswith exportedAuroraAppPropsto avoid contract drift.Line 21 redefines the public prop contract locally; that duplicates
AuroraAppPropsand can silently diverge on future API changes.♻️ Suggested refactor
-import type { Slots } from "./AuroraApp" +import type { AuroraAppProps } from "./AuroraApp" -type AppProps = { - theme?: "theme-dark" | "theme-light" - bffEndpoint?: string - onThemeChange?: (theme: "theme-dark" | "theme-light") => void - slots?: Slots - appName?: string -} +type AppProps = AuroraAppProps🤖 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 `@packages/aurora/src/client/App.tsx` around lines 21 - 27, The AppProps type definition is duplicating the exported AuroraAppProps contract, which can cause them to drift apart during future updates. Remove the local AppProps type definition and replace all references to it with the exported AuroraAppProps type to ensure a single source of truth for the App component's prop contract.
🤖 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 `@packages/aurora/README.md`:
- Around line 23-33: The README code snippet uses top-level await with the
createServer call, but doesn't clarify the ESM/TLA (ECMAScript Modules/Top-Level
Await) requirement or provide an alternative for CommonJS users. Add a note
explaining that this snippet requires ESM support, or alternatively, wrap the
entire code block (including the createServer call and server.listen call) in an
async IIFE function to make it compatible with CommonJS setups.
---
Nitpick comments:
In `@packages/aurora/src/client/App.tsx`:
- Around line 21-27: The AppProps type definition is duplicating the exported
AuroraAppProps contract, which can cause them to drift apart during future
updates. Remove the local AppProps type definition and replace all references to
it with the exported AuroraAppProps type to ensure a single source of truth for
the App component's prop contract.
🪄 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: abf18ffe-8b66-4daa-b988-74458102b994
⛔ Files ignored due to path filters (1)
apps/dashboard/src/client/assets/favicon.icois excluded by!**/*.ico
📒 Files selected for processing (10)
.changeset/branding-slots.mdapps/dashboard/.env.exampleapps/dashboard/src/client/index.htmlcommitlint.config.mjspackages/aurora/README.mdpackages/aurora/src/client/App.tsxpackages/aurora/src/client/AuroraApp.tsxpackages/aurora/src/client/components/Slot.tsxpackages/aurora/src/client/components/navigation/MainNavigation.tsxpackages/aurora/src/client/routes/__root.tsx
bd706f6 to
f556a49
Compare
Summary
Adds a branding and extensibility layer to
AuroraAppvia the slot system, allowing consumers to customise the logo, app name, and page footer without forking the package.Changes Made
slots.logo: new slot that replaces the default Aurora SVG in the page header (renders outside shadow DOM, inherits header styles)slots.pageFooter: new slot that replaces the default empty page footer (renders outside shadow DOM)appName: new string prop — shown in the header breadcrumb and as the default logo title; defaults to"Aurora"Slotcomponent: newuseShadowDOMprop (defaulttrue) to opt out of shadow DOM isolation per slotREADME.md: updated configuration reference tables, added full Slots section, scoped docs to package API onlyAuroraApp.tsx: added JSDoc to all public types (SlotProps,Slots,AuroraAppProps)commitlint.config.mjs: replacedaurora-portalscope withauroraapps/dashboard: wires upVITE_APP_TITLEenv var for the page title; movesfavicon.icointo the app assetsRelated Issues
Testing Instructions
pnpm ipnpm --filter @cobaltcore-dev/aurora typecheckpnpm --filter @cobaltcore-dev/dashboard typecheckChecklist
Summary by CodeRabbit
New Features
Documentation
Chores