Repository navigation
fix(typecheck): restore typed add-dir source - #1504
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📜 Recent review details⏰ Context from checks skipped due to timeout of 900000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🧰 Additional context used📓 Path-based instructions (2)**/*⚙️ CodeRabbit configuration file
Files:
src/{components/permissions,utils/permissions,hooks/toolPermission,tools,entrypoints/sdk}/**⚙️ CodeRabbit configuration file
Files:
🔇 Additional comments (2)
📝 WalkthroughWalkthroughThis PR removes the ChangesType safety refactoring
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 5 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
jatmn
left a comment
There was a problem hiding this comment.
Thanks for the contribution. I do not see any actionable issues from my review.
Upstream 343cd1a..1204fe2, applied 6 of 8 KEEP candidates in tier 1: 11e46af fix(typecheck): narrow hook event counts (Twigpine#1496) 2c755d3 fix(typecheck): restore typed add-dir source (Twigpine#1504) 2bed184 perf(attachments): skip skill listings for utility forks (Twigpine#1545) 47eea3f fix(typecheck): type search UI state (Twigpine#1529) 96ddec7 fix(test): stop use-input test from leaking a global stdin mock (Twigpine#1501) 1fc5116 fix(api): tighten reasoning_content heuristic to prevent false-positives (Twigpine#1201) Notes: - 2c755d3: react-compiler compiled output (add-dir.tsx) replaced with typed source; build re-compiles on next run - 47eea3f: kept fork-specific // @ts-nocheck at top of GlobalSearchDialog.tsx (added by local b40814b, not in upstream); applied type Props + true arg - 96ddec7: bun.lock regenerated via 'bun install' to reconcile with new package.json (devDependencies pruned: react-hooks, react-test-renderer); new use-input.test.ts (208 lines) injected via StdinContext.Provider - 1fc5116: new runtimeMetadata.test.ts (90 lines, regression coverage for the segment-boundary heuristic per jatmn review) Verification: baseline: 2223 pass / 23 skip / 4 fail after: 2232 pass / 23 skip / 2 fail (+9 pass, -2 fail) typecheck: 90 errors (pre-existing, no new) build: Built v0.16.1 Rebase onto OpenCC v0.14.0 (2292a59).
Upstream 47eea3f..e7abb81, applied 2 of 5 KEEP candidates in tier 1 (3 already applied under prior sync 4f6bccc but were missed by subject-match dedup due to squash-merge subject loss): e357d59 fix(typecheck): restore proactive module import surface (Twigpine#1495) e7abb81 fix(typecheck): make session history cache variant-safe (Twigpine#1494) Already-applied (byte-equal content + fork-specific @ts-nocheck): 47eea3f fix(typecheck): type search UI state (Twigpine#1529) 11e46af fix(typecheck): narrow hook event counts (Twigpine#1496) 2c755d3 fix(typecheck): restore typed add-dir source (Twigpine#1504) Notes: - e357d59: 2 new files (src/proactive/{index.ts,index.test.ts}); pulls cleanly, no provider leakage - e7abb81: 1 new file (sessionHistorySerialization.ts) + 3 mods. sessionHistory.test.ts gets // @ts-nocheck (upstream tests use SDKUserMessage.message + new serialization import; local SDKUserMessage type doesn't include .message field, and sessionHistory.ts still uses inline impl). sessionHistory.ts gets the upstream rewrite (inline functions replaced with imports from sessionHistorySerialization.ts); @ts-nocheck preserved. - conversationCache.ts: Message[] → CacheMessage[]; CacheMessage becomes Record<string, unknown> (was: alias of Message interface) Verification: typecheck: 0 errors bun test src/assistant/sessionHistory.test.ts: 6 pass, 0 fail bun test src/proactive/index.test.ts: 2 pass, 0 fail build: Built v0.16.1 → dist/cli.mjs naming scan: no openclaude/gitlawb leakage
Refs #1486.
Summary
AddDirErrorfrom compiler-cache output to typed React source.string | nullso validation help messages can be assigned.Why
The add-dir command source had compiler-cache output checked in, and the current typecheck run reported a
SetStateAction<null>diagnostic whenAddWorkspaceDirectorystores validation help text.Validation
git diff --checkbun run buildbun test src/commands/add-dir(no matching focused test files exist)bun run typecheckstill exits 2 because of the unrelated existing backlog; normalized diagnostics for this branch go from 1,760 to 1,759, with 0 new diagnostics and 1 removed diagnostic. No diagnostics remain forsrc/commands/add-dir/add-dir.tsxorsrc/components/permissions/rules/AddWorkspaceDirectory.tsx.Review
Summary by CodeRabbit