chore: release v0.9.2-beta.2#246
Merged
Merged
Conversation
refactor(terminal): extract ProjectTerminalPane (Cycle 21)
- EdtStallMonitor (67 lines) to ui/diagnostics/ — EDT stall detection thread - UpdateCheckController (178 lines) to ui/update/ — update check + buildSparkle4jInstance - MainWindow reduced from 697 → 548 lines (-149) - +10 new tests (EdtStallMonitorTest: 5, UpdateCheckControllerTest: 5)
Cycle 22: Extract EdtStallMonitor + UpdateCheckController from MainWindow
* chore: add CodexScreenshotTest with terminal divider resize Adds a JUnit test that launches the IDE inside MainWindow, activates the project terminal, runs the codex CLI, and captures a PNG + buffer dump under target/codex-screenshots/. The test inherits the user's saved docking layout, which has the terminal+editor tabbed pane at ~10%% of the upper JSplitPane. setUp walks the contentPane tree, finds the innermost JSplitPane containing the terminal dockable, and snaps the divider to 90%% so the screenshot is representative of a real working session. Includes: - CodexScreenshotTest: window paint -> PNG, buffer dump via new TerminalPanel.getTerminalText() accessor; main terminalPanel field is now internal so the test can reach it - scripts/capture-window.ps1: PrintWindow-based capture of the live IDE for diagnostic screenshots (used to confirm the real layout) - scripts/run-codex-test.ps1: background runner with timeout that streams surefire stdout to a log file * chore: fix ktlint formatting in codex screenshot test files Auto-format applied to the new accessor and the test helper methods to satisfy the project's ktlint rules (multiline expression layout, parameter line breaks, no trailing blank line). * chore: add ktlint-check helper script Parallel to run-ktlint-format.ps1: runs the check variant (no auto-format), suitable for CI gating or quick local verification. * test(codex): skip CodexScreenshotTest in headless CI MainWindow init blocks on Swing display availability; in the containerized build (no Xvfb) the JFrame construction never completes and the setUp latch times out. Guard with the standard isHeadful() check used by ProjectTerminalPaneTest so the test is skipped on headless runs and runs in environments with a display.
…og from DirectoryPanel (#236) * Extract CompactProjectDirectoryRenderer from DirectoryPanel - Renderer (138 lines) moved to ui/renderers/ package - +8 tests for rendering, active dot, color stripe, git status, scan failure - DirectoryPanel reduced from 727 to ~589 lines * Extract ShellSettingsDialog from DirectoryPanel - ShellSettingsDialog follows EnvEditorDialog pattern - +6 tests for dialog fields, title, save callback - DirectoryPanel reduced from ~586 to ~526 lines * chore: delete tools/ debug scaffolding (2,945 lines) * chore: delete dead UI cluster and ProjectService (~1,063 lines) * chore: remove unused guava and mockk dependencies * refactor: extract shared scannerCmd() to eliminate cmd() duplication across 11 scanners * refactor: collapse CommandRunner interface into ProcessCommandRunner * chore: remove click-trace diagnostic scaffolding from ProjectTreePanel * chore: delete dead archive/needlecast-web module * chore: delete stale docs (TODO.md all done, ARCHITECTURE.md outdated) * chore: fix jpackage scripts, delete dead screenshots CI pipeline * fix: replace symlink/junction deploy with directory copy in SkillLibraryStore Symlinks require Developer Mode on Windows and junctions are fragile (fsutil string matching, mklink exit=1 failures). Replace with directory copy + marker file approach that works on all platforms without elevated privileges. * fix: harden ProcessCommandRunner — catch start failures, add watchdog timeout, fix charset * fix: add logging to silent catch blocks across 15 files * chore: fix ktlint formatting introduced by cycle-23 commits Auto-format applied to the files modified by the 12 unpushed cleanup commits (logging in silent catch blocks, scanner cmd() extraction, dead-code deletion). Same fix-up pattern as the preceding PRs - drop pre-existing ktlint failures on the cycle branch back to a clean check. * test(shell-settings): guard ShellSettingsDialogTest against headless CI The test instantiates JDialog directly, which throws HeadlessException in the headless container used by the standard verify job. Mark all six tests with the standard isHeadful() guard used elsewhere (ProjectTerminalPaneTest) so they skip on headless runs and execute on a developer machine or in the dedicated UI test profile.
…ble (#239) Cycle 24 test-coverage work. Two gaps identified and closed: - ProjectDirectory.label() now tested across Windows backslash paths, mixed-separator paths, root paths, and trailing-slash edge cases. The trailing-slash case revealed a real quirk (returns the full path because substringAfterLast returns empty, triggering the ifBlank fallback) and the test now documents that behavior. - makeRelativeIfPossible was a private function in ProjectTreeDialogs with no direct test. Extracted to a top-level internal function and added 6 tests covering child/grandchild/sibling/outside/same/separator cases. All 21 new tests pass cleanly in isolation. Two pre-existing flaky tests (ProjectTerminalPaneTest, TextChunkerTest) intermittently fail in the full parallel suite; unrelated to these changes.
ProjectTerminalPaneTest: PTY process held a lock on @tempdir, causing JUnit cleanup to fail with FileSystemException. Fix: destroy the PTY process forcibly in TerminalPanel.dispose() and add @AfterEach teardown to guarantee cleanup even on test failure. TextChunkerTest: Swing Timer fires on the EDT which gets starved under parallel test load, causing the 5s busy-wait to timeout. Fix: pump the EDT with invokeAndWait in the wait loop and increase deadline to 15s. 3 consecutive full-suite green runs (647/0/0) across both tests.
#241) Extract parseRenovateReport() and buildRenovateReplacements() as top-level internal functions so they can be tested directly. The private parseReport/buildReplacements in RenovatePanel now delegate to them. Coverage includes: - parseRenovateReport: empty/missing data, single dep, currentVersion fallback, type+name sorting, multiple updates per dep, shared variable fields, skip no-updates deps, multiple managers - buildRenovateReplacements: shared Maven property dedup, Dockerfile digest pinning, Dockerfile simple substitution, skip unknown versions, direct version replacement, groups by file path, skip same-version
Extract pure-logic functions for testability: - matchProjectPath(cwd, paths) extracted from TerminalManager.onHookEvent. Tests: exact match, subdirectory match, no match, directory boundary, backslash normalization (both cwd and registered paths), first-match semantics, empty paths, trailing slash. - buildCommandsKey(project) extracted from PanelCoordinator. Tests: single command key format, multi-command pipe separator, same commands same key, different label/argv/workingDir/order produce different keys, empty commands, argv null-char separator.
…est (#243) 14 new tests for two already-internal functions that had zero coverage: - toHtmlLabel(): HTML entity escaping (&, <, >) with html wrapper. 8 tests: plain text, individual escapes, combined, empty, multiple ampersands, double-escaping of already-escaped entities. - applyCommandOverrides(): command override matching by argv. 6 tests: empty overrides (identity), match replaces label+argv, non-match preserved, buildTool/workingDir/env preserved, partial override, duplicate overrides (last wins). Also fixes flaky ProjectTreePanelUiTest: click point now uses row-relative X coordinate instead of tree-width edge, and adds a wait loop for the selection assertion instead of instant check.
…uping tests (23 tests) (#244) Extract three pure-logic functions for testability: - extractTemplateVariables/applyTemplateSubstitutions from PromptLibraryDialog. 10 tests: single/multiple/dedup variables, no placeholders, underscores+digits, placeholder replacement, unmatched placeholders, empty map, same key multiple times. - isBinaryFile from SearchPanel. 6 tests: text file, null byte, empty file, null at boundary (position 4095), nonexistent file, large text file. - groupChangeBlocks from DiffOverviewBar. 7 tests: empty, all context, single added block, separate added+removed, consecutive different types, all added, changes at start and end. 719 total tests, 0 failures.
…#245) splitLinesForSideBySide (DiffContentPanel): the core algorithm for partitioning diff lines into left/right columns with padding. 10 tests: empty, context duplicated, removed-only padding, added-only padding, paired remove+add, unequal blocks (both directions), mixed context and changes, added without preceding removed, all context. gitStatusColor (extracted from GitLogPanel.FileCheckboxRenderer): maps git XY status codes to colours. 10 tests: modified/staged-modified/both-modified → blue, added → green, deleted/staged-deleted → red, untracked → grey, renamed → grey, copied-with-modification → blue, AM → blue (M priority). 739 total tests, 0 failures.
Automated Checks (advisory, non-blocking)✅ All checks passed. Surmado Code Review — Free tier limit reachedYou've used all 10 free reviews this month. Deterministic checks (secrets, model strings) still ran above. Upgrade to the Paid plan for 100 reviews/month + $15 per additional 100: https://app.surmado.com/checkout?plan=pr_review_starter Or wait until your next monthly window for 10 more free reviews. Surmado Code Review (v1.2-mt) |
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.
Bump version to 0.9.2-beta.2 in both pom.xml files. Includes cycles 21-23 (terminal pane extraction, MainWindow decomposition, DirectoryPanel split) and expanded test coverage (PRs #239-#245).