Upgraded version with all latest changes (extends PR #1)#2
Open
Upgraded version with all latest changes (extends PR #1)#2
Conversation
Add comprehensive state transition tests for TUI model including: - Navigation (Tab focus switching, Escape to return) - Mode switching (search, help) - Key sequences (multi-step user flows) - View rendering (table and help output) Increases pkg/cli test coverage from 2.4% to 32.9%. Tests verify model state transitions without requiring terminal UI.
…and name:port disambiguation
- Add batch start/stop/restart commands accepting multiple service names
- Support glob pattern matching ('service*', '*-api', '*web*')
- Add name:port format for disambiguation (web-api:3000)
- Add parser module with fallback lookup for name:port identifiers
- Update documentation with proper quoting examples
Files:
- pkg/cli/parser.go: New name:port parser with fallback logic
- pkg/cli/parser_test.go: Comprehensive parser unit tests
- pkg/cli/commands.go: Updated all commands to use parser
- cmd/devpt/main.go: Updated help text
- README.md, QUICKSTART.md: Added name:port examples
Related: DEVPT-001
Implement enhanced viewport interactions for logs viewer: - Mouse click navigation (gutter jump, text centering) - Keyboard shortcuts for highlight cycling (n/N keys) - Match counter display in footer (e.g., "Match 3/15") - Terminal resize persistence for highlight state Changes: - Add calculateGutterWidth() helper for viewport layout - Add highlightMatches[] and highlightIndex state fields - Add mouse click handling for gutter and text areas - Add keyboard event handling for n/N highlight navigation - Extend footer rendering with match counter - Add comprehensive test suite (17 tests, all passing) Test coverage: - Mouse click navigation (gutter, text, edge cases) - Highlight cycling (forward/backward, wrap behavior) - Match counter display (formatting, bounds) - Resize persistence (highlight state preservation) - Viewport integration (updates, sizing, content flow)
…view When switching from logs/debug mode back to table view, the viewport was not being properly redrawn because the tableContentHash optimization was preventing SetContent from being called. The viewport would continue to display stale logs content instead of the table content. The fix invalidates tableContentHash in all mode transition paths from logs/debug mode to table mode, forcing the viewport content to be refreshed on the next render cycle.
Cloudflared tunnels are commonly used for development to expose local servers publicly. Without this pattern, cloudflared processes would be filtered out during process scanning, causing managed services that use cloudflared to rely solely on the IsRunning fallback check. This could cause flickering (appearing/disappearing) if the process detection was inconsistent. Now cloudflared processes are properly detected and matched to their managed service definitions.
Previously, processes were filtered by dev patterns BEFORE matching to managed services. This caused non-dev commands (like cloudflared, custom scripts, etc.) to be filtered out, making their managed services rely solely on the IsRunning fallback check - which could cause flickering. Now the filter receives managed service PIDs upfront and always keeps those processes regardless of whether they match dev patterns. This ensures stable visibility for any managed service, no matter what command it runs. UX improvement: Users can add any process as a managed service and it will always be visible in the TUI without flickering.
Cherry-picked 52c426a with conflict resolution. The original fix ensures command mode (:) and search mode (/) handle all key input at the top of the Update function, preventing keys like 'b', 'q', 's', 'n' from being intercepted by other handlers. Conflicts resolved: - tui.go: Combined command/search mode handlers (from origin) with logs/logsDebug mode handlers (from our branch) at top of Update - tui_key_input_test.go: Updated to use pointer receiver (*topModel) to match our codebase convention - tui_ui_test.go: Updated hint text from 'Esc or b' to 'Esc to back'
- Selected line in running section shows gray when managed section has focus - Selected line in managed section shows gray when running section has focus - Single-click changes selection without switching focus (so gray is visible) - Double-click or Tab still switches focus and performs actions
- Add sort.go with sortMode types, cycleSort(), columnAtX(), sortServers() - Integrate sort state into model.go - Add sort styling to table headers (yellow/orange) - Handle mouse clicks on column headers in helpers.go - Add 's' key cycling in update.go - Add unit tests for sort cycling and column detection
TestTUIAdapterRestartCmd was failing on systems where the spawned process couldn't be killed due to permission restrictions. The test's purpose is to verify TUI restart doesn't leak output, not to verify process termination, so cleanup now tolerates ErrNeedSudo.
Wire toggleSortDirection() to Shift+S keybinding, add comprehensive test coverage for direction toggle, column reset behavior, and sort persistence across refresh cycles.
(cherry picked from commit 813947a)
Author
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.


Old PR: #1
Hi there,
Sorry, I decided to burn some tokens and pull your changes. I hope you haven't started working on conflict fixes.
Regarding your last fix - please check c376f11.
By the way, there is github action for building multi-platform binaries.
I'm just not sure that the release tags will be added into this repo.
Changelog copy here:
0.2.2
0.2.1
0.2.0
start,stop, andrestartcommands with quoted glob pattern support so multiple managed services can be controlled in one invocationname:porttargeting for managed services so ambiguous service names can be disambiguated from the CLIpkg/cli/tuiso the TUI logic is isolated from the main CLI packageEnterhandling so the top section opens logs and the bottom section starts the selected managed service without being swallowed by confirm bindings0.2.0and rendered the version in the TUI header in muted gray