Add orphaned features management routes and UI integration (#819)

* test(copilot): add edge case test for error with code field

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

* Changes from fix/bug-fixes-1-0

* refactor(auto-mode): enhance orphaned feature detection and improve project initialization

- Updated detectOrphanedFeatures method to accept preloaded features, reducing redundant disk reads.
- Improved project initialization by creating required directories and files in parallel for better performance.
- Adjusted planning mode handling in UI components to clarify approval requirements for different modes.
- Added refresh functionality for file editor tabs to ensure content consistency with disk state.

These changes enhance performance, maintainability, and user experience across the application.

* feat(orphaned-features): add orphaned features management routes and UI integration

- Introduced new routes for managing orphaned features, including listing, resolving, and bulk resolving.
- Updated the UI to include an Orphaned Features section in project settings and navigation.
- Enhanced the execution service to support new orphaned feature functionalities.

These changes improve the application's capability to handle orphaned features effectively, enhancing user experience and project management.

* fix: Normalize line endings and resolve stale dirty states in file editor

* chore: Update .gitignore and enhance orphaned feature handling

- Added a blank line in .gitignore for better readability.
- Introduced a hash to worktree paths in orphaned feature resolution to prevent conflicts.
- Added validation for target branch existence during orphaned feature resolution.
- Improved prompt formatting in execution service for clarity.
- Enhanced error handling in project selector for project initialization failures.
- Refactored orphaned features section to improve state management and UI responsiveness.

These changes improve code maintainability and user experience when managing orphaned features.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
gsxdsm
2026-02-27 22:14:41 -08:00
committed by GitHub
parent 0196911d59
commit 1c0e460dd1
36 changed files with 2048 additions and 406 deletions

View File

@@ -1,7 +1,8 @@
/**
* Cleanup leftover E2E test artifact directories.
* Used by globalSetup (start of run) and globalTeardown (end of run) to ensure
* test/board-bg-test-*, test/edit-feature-test-*, etc. are removed.
* Used by globalSetup (start of run) and globalTeardown (end of run) to ensure:
* - test/board-bg-test-*, test/edit-feature-test-*, etc. are removed
* - test/fixtures/.worker-* (worker-isolated fixture copies) are removed
*
* Per-spec afterAll hooks clean up their own dirs, but when workers crash,
* runs are aborted, or afterAll fails, dirs can be left behind.
@@ -25,9 +26,33 @@ const TEST_DIR_PREFIXES = [
'skip-tests-toggle-test',
'manual-review-test',
'feature-backlog-test',
'agent-output-modal-responsive',
'responsive-modal-test',
'success-log-contrast',
] as const;
/**
* Remove worker-isolated fixture copies (test/fixtures/.worker-*).
* These are created during test runs for parallel workers and should be
* cleaned up after tests complete (or at start of next run).
*/
export function cleanupLeftoverFixtureWorkerDirs(): void {
const fixturesBase = path.join(getWorkspaceRoot(), 'test', 'fixtures');
if (!fs.existsSync(fixturesBase)) return;
const entries = fs.readdirSync(fixturesBase, { withFileTypes: true });
for (const entry of entries) {
if (entry.isDirectory() && entry.name.startsWith('.worker-')) {
const dirPath = path.join(fixturesBase, entry.name);
try {
fs.rmSync(dirPath, { recursive: true, force: true });
console.log('[Cleanup] Removed fixture worker dir', entry.name);
} catch (err) {
console.warn('[Cleanup] Failed to remove', dirPath, err);
}
}
}
}
export function cleanupLeftoverTestDirs(): void {
const testBase = path.join(getWorkspaceRoot(), 'test');
if (!fs.existsSync(testBase)) return;