Skip to content

fix(durably-react): add isCancelled to client-mode useJob#22

Merged
coji merged 1 commit into
mainfrom
fix/add-iscancelled-to-client-usejob
Jan 18, 2026
Merged

fix(durably-react): add isCancelled to client-mode useJob#22
coji merged 1 commit into
mainfrom
fix/add-iscancelled-to-client-usejob

Conversation

@coji
Copy link
Copy Markdown
Owner

@coji coji commented Jan 18, 2026

Summary

  • Client-mode useJobisCancelled ステータスブーリアンを追加(Browser-mode との整合性を確保)
  • release-check スキルを新規作成(API変更時のパッケージ整合性チェック用)
  • 関連ドキュメント更新

Changes

Implementation

  • packages/durably-react/src/client/use-job.ts - isCancelled 追加

Documentation

  • packages/durably-react/docs/llms.md
  • docs/spec-react.md
  • website/api/durably-react/browser.md
  • website/api/durably-react/client.md
  • packages/durably-react/README.md

Tooling

  • .claude/skills/release-check/SKILL.md - 新規作成
  • CLAUDE.md - Skills セクション追加

Version

  • packages/durably → 0.8.1
  • packages/durably-react → 0.8.1

Test plan

  • pnpm validate 全パス
  • Browser/Client 両モードの useJob, useJobRun で isCancelled が利用可能

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added isCancelled boolean flag to the useJob hook for tracking cancelled job states across all modes.
    • Introduced additional state flags (isPending, isFailed) to client-mode API for better consistency with browser-mode.
  • Documentation

    • Updated API documentation to reflect new state flags and available options in all integration modes.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link
Copy Markdown

vercel Bot commented Jan 18, 2026

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

Project Deployment Review Updated (UTC)
durably-demo Ready Ready Preview Jan 18, 2026 3:34am

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 18, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Introduces isCancelled boolean property to useJob hook return type in client mode, aligning it with browser-mode API. Updates documentation and API surfaces across durably-react package and website. Adds version 0.8.1 changelog entry and includes a new Release Check skill document for structured pre-release verification workflows.

Changes

Cohort / File(s) Summary
Release & Versioning
.claude/skills/release-check/SKILL.md, CHANGELOG.md, CLAUDE.md, packages/durably/package.json, packages/durably-react/package.json
Adds new Release Check skill document outlining pre-release integrity verification workflow. Introduces version 0.8.1 changelog entry documenting isCancelled state addition for client-mode useJob. Version bumped in both durably and durably-react packages. Skills section added to CLAUDE.md.
Client-Mode Implementation
packages/durably-react/src/client/use-job.ts
Adds public boolean field isCancelled to UseJobClientResult interface. Derives value from effectiveStatus === 'cancelled' without modifying status calculation logic.
API Documentation
docs/spec-react.md, website/api/durably-react/browser.md, website/api/durably-react/client.md, website/public/llms.txt
Extends API specifications with isCancelled: boolean property. Browser and client API docs updated to include new flag. Client API removes isReady and adds isPending, isFailed, isCancelled. Public interfaces UseJobClientOptions and UseJobOptions defined.
Package Documentation
packages/durably-react/README.md, packages/durably-react/docs/llms.md
Expands server-connected mode example with additional return fields (isPending, isCompleted, isFailed, isCancelled). Updates UseJobResult interface documentation with new boolean flags.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Poem

🐰 A rabbit hops through client mode,
Finding isCancelled on the road,
Status truth, at last aligned—
Browser and client, intertwined!
With docs that gleam and skills so neat,
Version 0.8.1's complete! 🎉

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the primary change: adding isCancelled to client-mode useJob for consistency with browser-mode.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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

✨ Finishing touches
  • 📝 Generate docstrings

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

🤖 Fix all issues with AI agents
In `@openspec/changes/add-human-in-the-loop/specs/react/spec.md`:
- Around line 9-10: The mode label for the client variant is incorrect: change
the text so that "`useHumanWaits({ api })` in `@coji/durably-react/client`" is
labeled "(client mode)" instead of "(server mode)". Locate the spec entry
referencing the two variants (`useHumanWaits()` in `@coji/durably-react` and
`useHumanWaits({ api })` in `@coji/durably-react/client`) and update only the
parenthetical mode label for the `/client` entry to read "client mode" to match
the package path and scenario heading.
🧹 Nitpick comments (1)
CLAUDE.md (1)

83-85: Consider language consistency in documentation.

The new Skills section uses Japanese text while the rest of CLAUDE.md is in English. This creates a language inconsistency that may affect readability for international contributors.

Suggested English translation
 ## Skills
 
-- **release-check** - API変更・仕様追加時のパッケージ整合性チェック(`.claude/skills/release-check/`)
+- **release-check** - Package consistency checks for API changes and spec additions (`.claude/skills/release-check/`)

Comment thread openspec/changes/add-human-in-the-loop/specs/react/spec.md Outdated
Add missing isCancelled state boolean to UseJobClientResult interface
and return value. This makes client-mode useJob consistent with
browser-mode useJob which already included isCancelled.

- Add isCancelled: boolean to UseJobClientResult<TInput, TOutput>
- Add isCancelled: effectiveStatus === 'cancelled' to return object
- Update openspec/specs/react/spec.md to document the requirement

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coji coji force-pushed the fix/add-iscancelled-to-client-usejob branch from f53da80 to ce2de78 Compare January 18, 2026 03:34
@coji coji merged commit b466318 into main Jan 18, 2026
7 checks passed
@coji coji deleted the fix/add-iscancelled-to-client-usejob branch March 5, 2026 12:14
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