refactor(bootstrap): split monolithic index.ts into focused modules#71
Open
fshehadeh-sfl wants to merge 2 commits into
Open
refactor(bootstrap): split monolithic index.ts into focused modules#71fshehadeh-sfl wants to merge 2 commits into
fshehadeh-sfl wants to merge 2 commits into
Conversation
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
There was a problem hiding this comment.
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.tsto encapsulate review bundle construction and stream-event review triggering. - Added
src/bootstrap/runtimeBuilder.tsto centralize agent-adapter selection, orchestrator config derivation, and adapter wiring. - Added
src/admin/providerSummary.tsto 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 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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