Skip to content

Generic reconciliation adapter#496

Merged
InfinityBowman merged 3 commits into
mainfrom
generic-reconciliation-adapter
Apr 19, 2026
Merged

Generic reconciliation adapter#496
InfinityBowman merged 3 commits into
mainfrom
generic-reconciliation-adapter

Conversation

@InfinityBowman
Copy link
Copy Markdown
Owner

@InfinityBowman InfinityBowman commented Apr 19, 2026

Summary by CodeRabbit

  • Chores

    • Removed Git submodule reference from repository configuration.
    • Updated build configuration to exclude temporary local development directories.
  • Refactor

    • Enhanced and reorganized internal type system consistency across reconciliation and comparison features to improve code reliability, maintainability, and support better integration between components.

@InfinityBowman InfinityBowman merged commit fec78c1 into main Apr 19, 2026
1 of 2 checks passed
@InfinityBowman InfinityBowman deleted the generic-reconciliation-adapter branch April 19, 2026 04:36
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 19, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 27c5e074-1be1-4b5a-9ad6-e6706235ba47

📥 Commits

Reviewing files that changed from the base of the PR and between 497ba97 and cf5d149.

⛔ Files ignored due to path filters (3)
  • packages/docs/audits/checklist-data-access-migration.md is excluded by !packages/docs/audits/**
  • packages/docs/audits/hono-to-tanstack-migration.md is excluded by !packages/docs/audits/**
  • packages/docs/audits/post-migration-regressions.md is excluded by !packages/docs/audits/**
📒 Files selected for processing (14)
  • .claude/worktrees/admiring-leavitt-72e4d2
  • .gitignore
  • packages/shared/src/checklists/amstar2/compare.ts
  • packages/web/src/components/checklist/ROBINSIChecklist/checklist-compare.ts
  • packages/web/src/components/project/reconcile-tab/amstar2-reconcile/adapter.tsx
  • packages/web/src/components/project/reconcile-tab/engine/ReconciliationEngine.tsx
  • packages/web/src/components/project/reconcile-tab/engine/types.ts
  • packages/web/src/components/project/reconcile-tab/engine/useReconciliationEngine.ts
  • packages/web/src/components/project/reconcile-tab/rob2-reconcile/adapter.tsx
  • packages/web/src/components/project/reconcile-tab/rob2-reconcile/navbar-utils.ts
  • packages/web/src/components/project/reconcile-tab/robins-i-reconcile/NavbarDomainPill.tsx
  • packages/web/src/components/project/reconcile-tab/robins-i-reconcile/RobinsINavbar.tsx
  • packages/web/src/components/project/reconcile-tab/robins-i-reconcile/adapter.tsx
  • packages/web/src/components/project/reconcile-tab/robins-i-reconcile/navbar-utils.ts

📝 Walkthrough

Walkthrough

This PR generifies the reconciliation engine's type system by adding type parameters to EngineContext, NavbarContext, SummaryContext, and ReconciliationAdapter. It introduces discriminated union types for navigation items, exports previously internal comparison types, and tightens typing across multiple adapters while refactoring control flow with switch statements.

Changes

Cohort / File(s) Summary
Reconciliation Engine Type System
packages/web/src/components/project/reconcile-tab/engine/types.ts, packages/web/src/components/project/reconcile-tab/engine/ReconciliationEngine.tsx, packages/web/src/components/project/reconcile-tab/engine/useReconciliationEngine.ts
Generified core types with TChecklist, TFinalAnswers, TComparison, TNavItem parameters. Updated EngineContext, NavbarContext, SummaryContext, and ReconciliationAdapter to use generics instead of unknown fields. Updated adapter registry and hook options to reflect parameterized adapter types.
Comparison Type Exports
packages/shared/src/checklists/amstar2/compare.ts, packages/web/src/components/checklist/ROBINSIChecklist/checklist-compare.ts
Exported QuestionComparison, MultiPartComparison, and ComparisonResult interfaces from internal to public API surface for external type usage.
AMSTAR2 Adapter
packages/web/src/components/project/reconcile-tab/amstar2-reconcile/adapter.tsx
Introduced Amstar2NavItem exported interface. Tightened typing by removing unsafe casts and optional fallbacks. Updated buildNavItems() return type from ReconciliationNavItem[] to Amstar2NavItem[]. Generified adapter signatures and removed ReconciliationNavItem usage.
ROB2 Adapter & Navigation
packages/web/src/components/project/reconcile-tab/rob2-reconcile/adapter.tsx, packages/web/src/components/project/reconcile-tab/rob2-reconcile/navbar-utils.ts
Introduced Rob2NavItem discriminated union type replacing loosely-typed navigation items. Refactored getCurrentItemComparison and autoFillFromReviewer1 to use switch statements. Removed non-null assertions and explicit casts across adapter functions and helper signatures.
ROBINS-I Adapter & Navigation
packages/web/src/components/project/reconcile-tab/robins-i-reconcile/adapter.tsx, packages/web/src/components/project/reconcile-tab/robins-i-reconcile/navbar-utils.ts, packages/web/src/components/project/reconcile-tab/robins-i-reconcile/NavbarDomainPill.tsx, packages/web/src/components/project/reconcile-tab/robins-i-reconcile/RobinsINavbar.tsx
Introduced RobinsINavItem discriminated union. Refactored control flow to use switch statements instead of if/else chains. Consolidated NavItem definitions into shared navbar-utils. Removed non-null assertions and type casts while tightening signatures across adapters and components.
Repository Configuration
.claude/worktrees/admiring-leavitt-72e4d2, .gitignore
Removed Git submodule reference. Added .claude/worktrees/ to gitignore patterns.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~70 minutes

Possibly related PRs

✨ 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 generic-reconciliation-adapter

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.

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