refactor: consolidate constants and minor dedup (Phase 12)#830
Conversation
Remove duplicate AUTO_RUN_FOLDER_NAME constants and clean up related wrappers across the wizard / session pipeline. All 3 previous local definitions now import PLAYBOOKS_DIR from shared/maestro-paths.ts. Also drops orphan barrel exports and deprecated service wrappers that only existed to forward to the canonical implementation. Net: 17 files changed, 30 insertions(+), 67 deletions(-) = 37 lines removed. Playbook target was ~126 lines but DEFAULT_CAPABILITIES was already addressed in Phase 02, and CSS class extraction was deliberately NOT done - most Tailwind utility combos were either too few (2-3 call sites) or too context-dependent to warrant a shared constants file. Verified: - npm run lint clean (all 3 tsconfigs) - npx prettier --check clean - 262 targeted tests pass (useSessionCrud, useSessionRestoration, useWizardHandlers, existingDocsDetector, WizardIntegration)
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 7 minutes and 29 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (17)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
Thanks for the contribution, @jSydorowicz21! Clean work here — the consolidation of The test updates look correct too, including the expected-value fix in LGTM — approving. |
Greptile SummaryThis PR consolidates three locally-defined Confidence Score: 5/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["src/shared/maestro-paths.ts\nPLAYBOOKS_DIR = '.maestro/playbooks'"] --> B["existingDocsDetector.ts"]
A --> C["useSessionCrud.ts"]
A --> D["useSessionRestoration.ts"]
A --> E["useWizardHandlers.ts"]
A --> F["DebugWizardModal.tsx"]
A --> G["ConversationScreen.tsx"]
A --> H["DirectorySelectionScreen.tsx"]
A --> I["PhaseReviewScreen.tsx"]
A --> J["phaseGenerator.ts"]
subgraph Before["Before (3 local duplicates)"]
X1["const AUTO_RUN_FOLDER_NAME = '.maestro/playbooks'\nin existingDocsDetector.ts"]
X2["const AUTO_RUN_FOLDER_NAME = '.maestro/playbooks'\nin useSessionCrud.ts"]
X3["const AUTO_RUN_FOLDER_NAME = '.maestro/playbooks'\nin useSessionRestoration.ts"]
end
subgraph After["After (single canonical source)"]
A
end
Reviews (1): Last reviewed commit: "refactor: consolidate constants and mino..." | Re-trigger Greptile |
Summary
Removes duplicate
AUTO_RUN_FOLDER_NAMEconstants and cleans up related wrapper/barrel exports across the wizard / session pipeline.Net: -37 lines across 17 files
Changes
AUTO_RUN_FOLDER_NAMEnow importPLAYBOOKS_DIRfromsrc/shared/maestro-paths.tsWizard/index.tsandWizard/services/index.tsWhy this is smaller than the playbook target (~126 lines)
DEFAULT_CAPABILITIESwas already consolidated in Phase 02 - double-counted in the original playbookTest plan
npm run lintpasses (all 3 tsconfigs)npx prettier --check .passesPLAYBOOKS_DIRfor the scan).maestro/playbooks/directoryRisk
Very low. Pure constant consolidation - same value, different import path.