Skip to content

refactor(bootstrap): split monolithic index.ts into focused modules#71

Open
fshehadeh-sfl wants to merge 2 commits into
mainfrom
feature/c565cb75-refactor-split-monolithic-src-index-ts-7
Open

refactor(bootstrap): split monolithic index.ts into focused modules#71
fshehadeh-sfl wants to merge 2 commits into
mainfrom
feature/c565cb75-refactor-split-monolithic-src-index-ts-7

Conversation

@fshehadeh-sfl

Copy link
Copy Markdown
Collaborator

Extract review bootstrap logic, runtime dependencies builder, and admin provider
summaries from src/index.ts into dedicated modules. This improves modularity,
testability, and reduces the entry point from 754 lines to 327 lines while
maintaining full backward compatibility. All 1461 tests pass and linting is clean.

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com
Change-Id: Iffd2a25e2d53616e3ff897d300e8b7ebe69e2c6c

Extract review bootstrap logic, runtime dependencies builder, and admin provider
summaries from src/index.ts into dedicated modules. This improves modularity,
testability, and reduces the entry point from 754 lines to 327 lines while
maintaining full backward compatibility. All 1461 tests pass and linting is clean.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Change-Id: Iffd2a25e2d53616e3ff897d300e8b7ebe69e2c6c

Copilot AI 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.

Pull request overview

This PR refactors the application bootstrap by extracting review bootstrapping, runtime dependency assembly, and admin provider-summary building out of src/index.ts into dedicated modules, reducing the entry-point size while keeping runtime behavior consistent.

Changes:

  • Added src/review/reviewBootstrap.ts to encapsulate review bundle construction and stream-event review triggering.
  • Added src/bootstrap/runtimeBuilder.ts to centralize agent-adapter selection, orchestrator config derivation, and adapter wiring.
  • Added src/admin/providerSummary.ts to build the admin dashboard’s provider/status summaries outside the main entry point.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/index.ts Rewired bootstrap to use extracted builder/bootstrapping modules, reducing local helper density.
src/review/reviewBootstrap.ts New module for resolving review integrations, building the review orchestrator bundle, and creating the stream-events trigger.
src/bootstrap/runtimeBuilder.ts New module for runtime dependency construction (agent adapter) and orchestrator config derivation.
src/admin/providerSummary.ts New module that builds the Admin UI provider summary list previously embedded in src/index.ts.

Comment thread src/review/reviewBootstrap.ts Outdated
Comment on lines +1 to +5
/**
* Admin UI provider summaries.
*
* Builds the status summaries displayed in the admin dashboard's provider panel.
*/
Two review-feedback fixes:
- buildReviewBundle warned to configure a "sessionToken or apiKey", but the
  Copilot descriptor has no apiKey field — auth is sessionToken (OAuth) or
  token (PAT). Correct the hint so operators look for the right config keys.
- Add the extracted providerSummary.ts module to the admin module Files
  table so the new provider-summary entry point is discoverable.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

2 participants