Skip to content

Conversation

@vibegui
Copy link
Contributor

@vibegui vibegui commented Nov 12, 2025

Summary by CodeRabbit

Release Notes

  • New Features
    • Added page-level caching configuration with customizable Cache-Control headers for managing CDN cache behavior effectively
    • Supports both default and custom caching strategies on a per-page basis
    • Includes automatic device and time-based variant optimization for enhanced caching efficiency
    • Maintains full backward compatibility with existing cache settings and legacy configuration formats

@github-actions
Copy link
Contributor

Tagging Options

Should a new tag be published when this PR is merged?

  • 👍 for Patch 0.130.14 update
  • 🎉 for Minor 0.131.0 update
  • 🚀 for Major 1.0.0 update

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 12, 2025

Walkthrough

Version control now ignores cursor indexing and specstory directories. Page component adds CDN/page-level caching support through new props and header management utilities, with backward compatibility for legacy cache configurations.

Changes

Cohort / File(s) Change Summary
Version Control Configuration
.gitignore
Added ignore entries for .cursorindexingignore file and .specstory/ directory
Caching Feature
website/pages/Page.tsx
Added cacheControl and cacheHeader props to Props interface; introduced CacheHeaderConfig union type and internal CacheHeaderDefault and CacheHeaderCustom interfaces; extended page loader to compute normalized Cache-Control headers and set cache-related headers with legacy compatibility; imported header utilities for cache management

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Areas requiring attention:

  • Verify backward compatibility logic correctly handles legacy cache configuration shapes (cache object with mode/value, direct strings)
  • Validate normalization logic for Cache-Control headers and correct header constant usage
  • Confirm device/time variant allowance constraints are properly enforced when caching is enabled
  • Review type definitions for CacheHeaderConfig union to ensure completeness

Poem

🐰 Cache Control, oh what a sight,
Headers now dance in page light,
Legacy paths won't cause a fight,
Device variants kept just right,
CDN speeds take their flight!

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request has no description provided. The repository requires sections covering contribution overview, issue link, Loom video, and demonstration link. Add a pull request description including: brief overview of changes, link to relevant issue, Loom video demonstrating the feature, and demonstration link for testing.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main change: adding cache control options and headers to the Page component for CDN caching support.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/cache-non-variant-page

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.

Copy link
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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between adb6d7e and 4df6927.

📒 Files selected for processing (2)
  • .gitignore (1 hunks)
  • website/pages/Page.tsx (3 hunks)
🧰 Additional context used
🪛 GitHub Actions: ci
website/pages/Page.tsx

[error] 20-20: TS2305: Module 'https://jsr.io/@deco/deco/1.128.2/utils/mod.ts' has no exported member 'DECO_PAGE_CACHE_ALLOW_HEADER'.


[error] 21-21: TS2305: Module 'https://jsr.io/@deco/deco/1.128.2/utils/mod.ts' has no exported member 'DECO_PAGE_CACHE_CONTROL_HEADER'.


[error] 22-22: TS2305: Module 'https://jsr.io/@deco/deco/1.128.2/utils/mod.ts' has no exported member 'normalizeCacheControlHeader'.

Comment on lines +19 to +23
import {
DECO_PAGE_CACHE_ALLOW_HEADER,
DECO_PAGE_CACHE_CONTROL_HEADER,
normalizeCacheControlHeader,
} from "@deco/deco/utils";
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Fix missing exports before merge

The CI run for November 12, 2025 is failing with TS2305 because @deco/[email protected]/utils does not export DECO_PAGE_CACHE_ALLOW_HEADER, DECO_PAGE_CACHE_CONTROL_HEADER, or normalizeCacheControlHeader. Please point these imports at a module that actually exports them (or update the dependency to a version that does) so the project compiles.

🧰 Tools
🪛 GitHub Actions: ci

[error] 20-20: TS2305: Module 'https://jsr.io/@deco/deco/1.128.2/utils/mod.ts' has no exported member 'DECO_PAGE_CACHE_ALLOW_HEADER'.


[error] 21-21: TS2305: Module 'https://jsr.io/@deco/deco/1.128.2/utils/mod.ts' has no exported member 'DECO_PAGE_CACHE_CONTROL_HEADER'.


[error] 22-22: TS2305: Module 'https://jsr.io/@deco/deco/1.128.2/utils/mod.ts' has no exported member 'normalizeCacheControlHeader'.

🤖 Prompt for AI Agents
In website/pages/Page.tsx around lines 19 to 23, the current import targets
DECO_PAGE_CACHE_ALLOW_HEADER, DECO_PAGE_CACHE_CONTROL_HEADER, and
normalizeCacheControlHeader from "@deco/deco/utils", but that module version
(1.128.2) does not export those symbols; either update the dependency to a
release that exports them or change the import to the module that actually
exports them (e.g., import from the correct path in @deco/deco such as
"@deco/deco/cache" or the module where those names live). Modify the import
statement to reference the correct module, then run the lockfile install
(npm/yarn/pnpm install) and re-run TypeScript to ensure TS2305 is resolved.

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.

2 participants