Skip to content

chore: upgrade apsara rc.4 → rc.7, fix breaking changes, auto-expand sidebar groups#70

Open
rsbh wants to merge 8 commits into
mainfrom
chore/apsara-rc6
Open

chore: upgrade apsara rc.4 → rc.7, fix breaking changes, auto-expand sidebar groups#70
rsbh wants to merge 8 commits into
mainfrom
chore/apsara-rc6

Conversation

@rsbh
Copy link
Copy Markdown
Member

@rsbh rsbh commented May 14, 2026

Summary

Upgrade @raystack/apsara from 1.0.0-rc.4 to 1.0.0-rc.7 with breaking change fixes.

Upgrades

  • rc.4 → rc.5: FloatingActions, OKLCH colors, Select/Input/Toast fixes
  • rc.5 → rc.6: DataTable fixes, typography tokens, Link render prop, onValueChange
  • rc.6 → rc.7: Latest fixes and improvements

Breaking change fixes

  • InputFieldInput (renamed in rc.6)
  • String gap props → numeric (gap={3} instead of gap="small")
  • Link uses external prop + render={<RouterLink />} for client navigation

New feature

  • Sidebar folders auto-open when current page is inside them

Test plan

  • Build passes
  • Dev server renders pages
  • Sidebar folders open when navigating to child pages
  • Internal links use client-side navigation
  • External links open in new tab
  • Playground dialog inputs work

@vercel
Copy link
Copy Markdown

vercel Bot commented May 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
chronicle Ready Ready Preview, Comment May 15, 2026 4:16am

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 14, 2026

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Sidebar now intelligently expands to display the active page and related navigation.
  • Improvements

    • Enhanced link navigation routing for better user experience.
    • Updated input field components with improved styling and functionality.
    • Refined layout spacing throughout the interface.
  • Dependencies

    • Updated Apsara UI library to the latest release candidate version.

Walkthrough

This PR upgrades @raystack/apsara to 1.0.0-rc.7, migrates the playground dialog to use Input instead of InputField, refactors the Link component to use ApsaraLink's declarative render pattern, adds active-state detection for sidebar folder expansion in Layout, and consolidates spacing tokens to numeric values across theme components.

Changes

Apsara upgrade and component refactoring

Layer / File(s) Summary
Apsara upgrade and InputField-to-Input migration
packages/chronicle/package.json, packages/chronicle/src/components/api/playground-dialog.tsx
@raystack/apsara is updated to 1.0.0-rc.7; playground-dialog replaces InputField with Input across auth, path, query, and body input fields.
Link component routing pattern refactor
packages/chronicle/src/components/mdx/link.tsx
Removes imperative useNavigate call and click handler, instead delegating internal routing to react-router Link via ApsaraLink's render prop and setting external flag for external links.
Layout sidebar expansion logic and spacing token updates
packages/chronicle/src/themes/default/Layout.tsx
Adds hasActiveDescendant helper to determine whether sidebar folders should expand based on active page location; converts spacing from string tokens to numeric values across sidebar header, navigation, and API sections.
Theme spacing token consolidation to numeric values
packages/chronicle/src/themes/default/ContentDirButtons.tsx, packages/chronicle/src/themes/default/VersionSwitcher.tsx, packages/chronicle/src/themes/paper/VersionSwitcher.tsx
Flex component gap props updated from string token 'small' to numeric value 3 across layout components in default and paper themes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • rohanchkrabrty
  • rohilsurana
🚥 Pre-merge checks | ✅ 4 | ❌ 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 (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main changes: upgrading apsara from rc.4 to rc.7, fixing breaking changes, and adding auto-expand sidebar feature.
Description check ✅ Passed The description comprehensively covers the upgrade path, breaking change fixes, new features, and test plan, all related to the changeset.
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.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/apsara-rc6

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


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 and usage tips.

rsbh and others added 7 commits May 14, 2026 16:05
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Uses NodeType constants from tree-utils.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@rsbh rsbh force-pushed the chore/apsara-rc6 branch from 29f08f6 to 047bca5 Compare May 14, 2026 10:36
@rsbh rsbh changed the title chore: upgrade @raystack/apsara rc.4 → rc.6 chore: upgrade apsara rc.4 → rc.7, fix breaking changes, auto-open sidebar May 14, 2026
@rsbh rsbh changed the title chore: upgrade apsara rc.4 → rc.7, fix breaking changes, auto-open sidebar chore: upgrade apsara rc.4 → rc.7, fix breaking changes, auto-expand sidebar groups May 14, 2026
All were pure 'use client' + re-export. Apsara rc.6+ already marks
its exports as client components. Only callout.tsx kept (has logic).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/chronicle/src/themes/default/Layout.tsx`:
- Line 261: The Sidebar.Group currently uses defaultOpen={hasActiveChild} which
only sets initial state and won't update on client-side route changes; replace
the uncontrolled prop with a controlled API by using open={hasActiveChild} on
Sidebar.Group and add an onOpenChange handler (e.g.,
onOpenChange={setLocalOpenState}) to sync user toggles with your component state
while keeping hasActiveChild drive expansion on navigation; update any local
state logic to respect hasActiveChild so route-driven expands override or
initialize the controlled open state as intended.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6355dad9-5bd5-4774-9d18-0f3ff777953e

📥 Commits

Reviewing files that changed from the base of the PR and between eef9f1e and b86e0eb.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (17)
  • packages/chronicle/package.json
  • packages/chronicle/src/components/api/playground-dialog.tsx
  • packages/chronicle/src/components/common/breadcrumb.tsx
  • packages/chronicle/src/components/common/button.tsx
  • packages/chronicle/src/components/common/code-block.tsx
  • packages/chronicle/src/components/common/dialog.tsx
  • packages/chronicle/src/components/common/index.ts
  • packages/chronicle/src/components/common/input-field.tsx
  • packages/chronicle/src/components/common/sidebar.tsx
  • packages/chronicle/src/components/common/switch.tsx
  • packages/chronicle/src/components/common/table.tsx
  • packages/chronicle/src/components/common/tabs.tsx
  • packages/chronicle/src/components/mdx/link.tsx
  • packages/chronicle/src/themes/default/ContentDirButtons.tsx
  • packages/chronicle/src/themes/default/Layout.tsx
  • packages/chronicle/src/themes/default/VersionSwitcher.tsx
  • packages/chronicle/src/themes/paper/VersionSwitcher.tsx
💤 Files with no reviewable changes (10)
  • packages/chronicle/src/components/common/code-block.tsx
  • packages/chronicle/src/components/common/table.tsx
  • packages/chronicle/src/components/common/breadcrumb.tsx
  • packages/chronicle/src/components/common/switch.tsx
  • packages/chronicle/src/components/common/button.tsx
  • packages/chronicle/src/components/common/dialog.tsx
  • packages/chronicle/src/components/common/input-field.tsx
  • packages/chronicle/src/components/common/sidebar.tsx
  • packages/chronicle/src/components/common/tabs.tsx
  • packages/chronicle/src/components/common/index.ts

label={item.name?.toString() ?? ''}
leadingIcon={icon ?? undefined}
collapsible={depth === 1}
defaultOpen={hasActiveChild}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🌐 Web query:

In @raystack/apsaraSidebar.Group, doesdefaultOpen update behavior on prop change after mount, or is it only initial state? If only initial, what is the recommended controlled API (open/onOpenChange) for route-driven expansion?

💡 Result:

defaultOpen on @raystack/apsara Sidebar.Group is intended as an uncontrolled “initial state” prop; it should not be relied on to react to prop changes after mount. For route-driven expansion, use the controlled API: set the relevant expanded/open state via the open prop and update it in response to changes via onOpenChange. In the Sidebar docs, open is described as “Controls the expanded/collapsed state”, onOpenChange as “Callback when expanded/collapsed state changes”, and defaultOpen as “Default expanded/collapsed state” (i.e., only the initial/uncontrolled value) [1].

Citations:


Use controlled open prop for route-driven folder expansion.

Sidebar.Group treats defaultOpen as initial-only state and does not react to prop changes after mount. Since hasActiveChild is computed per route, the folder will not auto-expand on client-side navigation. Switch to the controlled API: set open={hasActiveChild} and use onOpenChange to handle state updates.

🤖 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/chronicle/src/themes/default/Layout.tsx` at line 261, The
Sidebar.Group currently uses defaultOpen={hasActiveChild} which only sets
initial state and won't update on client-side route changes; replace the
uncontrolled prop with a controlled API by using open={hasActiveChild} on
Sidebar.Group and add an onOpenChange handler (e.g.,
onOpenChange={setLocalOpenState}) to sync user toggles with your component state
while keeping hasActiveChild drive expansion on navigation; update any local
state logic to respect hasActiveChild so route-driven expands override or
initialize the controlled open state as intended.

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