Skip to content

升级 Docs Workflow 到 Calcit 0.41.0 并类型化导航 - #109

Merged
tiye merged 1 commit into
mainfrom
migrate/docs-workflow-calcit-0410
Nov 11, 2026
Merged

tiye merged 1 commit into
mainfrom
migrate/docs-workflow-calcit-0410

Conversation

@tiye

@tiye tiye commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

使用者影响

复制模板后使用正式 Calcit 与 @calcit/procs 0.41.0,重新安装依赖并生成 JS。页面导航、历史、Quick Jump、Reel 和 mdBook 路径沿用原行为。

改动与风险

  • 五个页面选择回调派发具名 :navigate,携带受检游标与页面 State。原 :states 继续供弹窗和框架状态使用。
  • 原导航回归同时校验操作身份、页面路径和历史顺序。保留原 Linux 门禁与双前端构建,PR 沿用隔离 artifact。

验证

264 个定义、完整 strict、原生回归、原 Node 导航回归、Vite 和 mdBook 构建通过。隔离 Chromium 验证页面与子页切换、Quick Jump 开关及 Reel 开关。

Summary by CodeRabbit

  • Bug Fixes
    • Navigation selections now update the documentation navigation state through dedicated navigation actions. Selected paths and navigation history continue to be handled during page changes.
    • Updated navigation checks cover selection callbacks and subsequent navigation updates, helping ensure the documentation UI responds consistently.

@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Explain Change →

Walkthrough

The change updates Calcit dependencies and optional-value syntax. It adds an Op :navigate operation for page selection and updates the state updater and navigation tests to use that operation.

Changes

Navigation update

Layer / File(s) Summary
Calcit 0.41 syntax and schema updates
README.md, deps.cirru, package.json, calcit.cirru
The Calcit and @calcit/procs versions change to 0.41.0. Optional values use Some and None, and several schemas use unqualified or aliased types.
Navigation operation and callbacks
calcit.cirru
The Op schema adds :navigate with a cursor and State payload. Page-selection callbacks dispatch :navigate instead of :states.
Updater handling and navigation tests
calcit.cirru, test/navigation.test.mjs
The updater handles :navigate by updating the state tree and decoding it as a map. Tests check the :navigate tag and schema.Op definition.

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

Change: Other

Sequence Diagram(s)

sequenceDiagram
  participant Nav as Navigation callbacks
  participant Dispatch as dispatch!
  participant Updater as State updater
  Nav->>Dispatch: Dispatch Op :navigate with cursor and state
  Dispatch->>Updater: Pass Op :navigate
  Updater->>Updater: Update state tree and decode map
Loading

Possibly related PRs

Suggested reviewers: claude

Merge Risk: Minimal · up to ea55e

Navigation now uses :navigate; the API description still names :states. No material merge-blocking risk was established.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly summarizes the Calcit 0.41.0 upgrade and typed navigation changes.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
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.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files. (4 skipped: 4 unsupported.)

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Additional comments: 1

README.md: 1

39-39: Minor · Functional Correctness · Quick win

Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.

Update the documented navigation operation.

Line 39 tells callers that navigation sends Op :states cursor next-state. The changed callbacks send Op :navigate cursor next-state. Replace :states in this API description so callers can identify the correct operation. (raw.githubusercontent.com)

Review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 003af4ba-668c-49e5-b3b4-a82e9593e847
Commits

Reviewing files that changed from the base of the PR and between 7c72dff and ea55ee4.

Files ignored due to path filters: 1

  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
Files selected for processing: 5

  • README.md
  • calcit.cirru
  • deps.cirru
  • package.json
  • test/navigation.test.mjs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@tiye
tiye merged commit abd51c5 into main Nov 11, 2026
1 check passed
@tiye
tiye deleted the migrate/docs-workflow-calcit-0410 branch November 11, 2026 08:18
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