Skip to content

refactor: package code organization wave 13 - #2367

Merged
gsxdsm merged 3 commits into
feature/code-organization-wave12from
feature/code-organization-wave13
Jul 22, 2026
Merged

refactor: package code organization wave 13#2367
gsxdsm merged 3 commits into
feature/code-organization-wave12from
feature/code-organization-wave13

Conversation

@gsxdsm

@gsxdsm gsxdsm commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

Wave 13 of package code organization (stacks on #2362 / wave 12).

Peels

New module Parent
app/api/planning.ts planning mode + agent onboarding streams
app/api/dev-server.ts dev-server detect/session/log/preview client
app/api/mission-interview.ts mission / milestone / slice interview streams
app/api/models-usage.ts models registry + usage
app/api/task-steer.ts steer / spec revise / rebuild / refine
app/api/ai-summarize.ts AI title summarization
task-store/task-artifacts-ops.ts rename of remaining-ops-7

Public paths stay stable via legacy.ts re-exports (app/api.tslegacy).

LOC

  • legacy.ts ~3342 → ~1408 (under the 2000-line hard cap; removed from grandfather baseline)

Shims

  • legacy.ts → peels above (delete-when: dashboard imports domain modules)
  • remaining-ops-7task-artifacts-ops (rename complete)

Test plan

  • eslint on peeled API modules + legacy
  • dashboard app typecheck (wave13-related errors cleared)
  • core typecheck
  • pnpm check:line-count (baseline updated)
  • CI merge gate

…acts-ops

Behavior-preserving package organization after wave 12:
- app/api: planning, dev-server, mission-interview, models-usage,
  task-steer, ai-summarize (legacy re-exports kept)
- rename remaining-ops-7 → task-store/task-artifacts-ops.ts
- legacy.ts shrinks below the 2000-line cap (~3342 → ~1408)
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 852dd2dc-b6f1-42ef-b800-b27ec96f669d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/code-organization-wave13

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.

@greptile-apps

greptile-apps Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR reorganizes package code while keeping existing public API paths stable. The main changes are:

  • Moves dashboard planning and onboarding APIs into a focused module.
  • Moves dev-server and interview APIs into focused modules.
  • Moves model usage, task steering, and title summarization into focused modules.
  • Preserves dashboard imports through the legacy API barrel.
  • Renames the core task artifact operations module and updates its importers.
  • Updates the line-count baseline.

Confidence Score: 5/5

This looks safe to merge.

  • The core rename preserves the imported symbol set.
  • The dashboard barrel keeps the existing public import paths.
  • No blocking issue tied to the eligible follow-up scope was found.

Important Files Changed

Filename Overview
packages/dashboard/app/api/legacy.ts Replaces inline implementations with value and type re-exports from the focused API modules.
packages/dashboard/app/api/dev-server.ts Contains the extracted dev-server detection, lifecycle, logging, preview, and session APIs.
packages/dashboard/app/api/planning.ts Contains the extracted planning and agent-onboarding request and stream APIs.
packages/dashboard/app/api/mission-interview.ts Contains the extracted mission, milestone, and slice interview APIs.
packages/dashboard/app/api/models-usage.ts Contains the extracted model registry and provider usage APIs.
packages/dashboard/app/api/task-steer.ts Contains the extracted task steering, specification revision, rebuild, and refinement APIs.
packages/dashboard/app/api/ai-summarize.ts Contains the extracted AI title summarization client.
packages/core/src/task-store/task-artifacts-ops.ts Renames the task-store operations module while retaining its implementation.
packages/core/src/store.ts Updates the store to import task artifact operations from the renamed module.

Reviews (3): Last reviewed commit: "merge: wave12 into wave13 after main boo..." | Re-trigger Greptile

@gsxdsm
gsxdsm merged commit 0681d47 into feature/code-organization-wave12 Jul 22, 2026
2 checks passed
@gsxdsm
gsxdsm deleted the feature/code-organization-wave13 branch July 22, 2026 04:21
gsxdsm added a commit that referenced this pull request Jul 22, 2026
## Summary

Wave 14 of package code organization (stacks on #2367 / wave 13).

### Peels

| New module | Parent |
|---|---|
| `types/task-review.ts` | task review + PR review surface types |
| `types/documents-artifacts.ts` | documents, artifacts, review-artifact
helpers, goal citations |
| `task-store/workflow-task-create-ops.ts` | rename of `remaining-ops-4`
|
| `task-store/task-mutation-ops.ts` | rename of `remaining-ops-2` |

Public paths stay stable via `types.ts` / `store.ts` re-exports.

### LOC

- `types.ts` ~6264 → ~5871

### Shims

- `types.ts` → peels above (delete-when: consumers import domain
modules)
- `remaining-ops-4` → `workflow-task-create-ops` (rename complete)
- `remaining-ops-2` → `task-mutation-ops` (rename complete)

Only `remaining-ops-1.ts` remains of the numbered ops series.

## Test plan

- [x] `@fusion/core` typecheck
- [x] `review-artifacts` unit tests
- [x] `pnpm check:line-count` (baseline updated)
- [ ] CI merge gate

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Refactor**
- Split task review, document, artifact, and goal-citation type
definitions into dedicated shared modules.
- Updated task-operation wiring to use the newer task-create/mutation
operation surfaces (no API changes intended).
- **Documentation**
- Corrected inline references and refreshed module headers to match the
current task-operation structure and domain naming.
- **Tests**
- Updated a test import to point to the current duplicate-auto-archive
backend implementation source.
- **Chores**
- Refreshed line-count baseline values to reflect the latest code
layout.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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