-
Notifications
You must be signed in to change notification settings - Fork 52
Remove EnhancedTailCommand. #104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThis PR removes the EnhancedTailCommand class and its supporting BaseConverter utility, replacing enhanced log viewing with a standard shell tail command. Configuration files, documentation, and related tests are updated to reflect this simplification. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
docs/commands.md (1)
17-17: Consider adding explanatory comment for consistency.The shell tail command replacement is correct. However, note that the config files (workbench/config/solo.php and docs/configuration.md) include a helpful comment about soloterm/vtail for enhanced log viewing. Consider adding the same comment here for consistency:
// For enhanced log viewing with vendor frame collapsing, see soloterm/vtail 'Logs' => 'tail -f -n 100 ' . storage_path('logs/laravel.log'),
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (4)
tests/Fixtures/enhance-log-wrap-vendor-test-2.logis excluded by!**/*.logtests/Fixtures/enhance-log-wrap-vendor-test.logis excluded by!**/*.logtests/Fixtures/home-end.logis excluded by!**/*.logtests/Fixtures/simple-multiline-test.logis excluded by!**/*.log
📒 Files selected for processing (15)
CLAUDE.md(1 hunks)README.md(2 hunks)config/solo.php(1 hunks)docs/built-in.md(1 hunks)docs/commands.md(1 hunks)docs/configuration.md(1 hunks)docs/index.md(0 hunks)docs/installation.md(1 hunks)src/Commands/EnhancedTailCommand.php(0 hunks)src/Support/BaseConverter.php(0 hunks)tests/Integration/EnhancedTailCommandTest.php(0 hunks)tests/Integration/HotkeyTest.php(1 hunks)tests/Unit/BaseConverterTest.php(0 hunks)tests/Unit/ScreenTest.php(1 hunks)workbench/config/solo.php(1 hunks)
💤 Files with no reviewable changes (5)
- docs/index.md
- tests/Integration/EnhancedTailCommandTest.php
- src/Commands/EnhancedTailCommand.php
- src/Support/BaseConverter.php
- tests/Unit/BaseConverterTest.php
🧰 Additional context used
📓 Path-based instructions (3)
tests/**/*.php
📄 CodeRabbit inference engine (CLAUDE.md)
Use Orchestra Testbench for testing Laravel package components with Unit tests in tests/Unit/ and Integration tests in tests/Integration/
Files:
tests/Unit/ScreenTest.phptests/Integration/HotkeyTest.php
tests/{Unit,Integration}/**/*.php
📄 CodeRabbit inference engine (CLAUDE.md)
Focus Unit tests on isolated components (ANSI parsing, wrapping, byte handling) and Integration tests on full command behavior (EnhancedTailCommand)
Files:
tests/Unit/ScreenTest.phptests/Integration/HotkeyTest.php
config/solo.php
📄 CodeRabbit inference engine (CLAUDE.md)
Use Laravel configuration file at config/solo.php to define commands array with command definitions
Files:
config/solo.php
🧠 Learnings (19)
📓 Common learnings
Learnt from: CR
Repo: soloterm/solo PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T03:14:59.029Z
Learning: Applies to src/Commands/EnhancedTailCommand.php : EnhancedTailCommand should support custom hotkeys: 'v' (toggle vendor), 'w' (wrap lines), 't' (truncate file) with vendor frame collapsing
📚 Learning: 2025-11-28T03:14:59.029Z
Learnt from: CR
Repo: soloterm/solo PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T03:14:59.029Z
Learning: Applies to src/Commands/EnhancedTailCommand.php : EnhancedTailCommand should support custom hotkeys: 'v' (toggle vendor), 'w' (wrap lines), 't' (truncate file) with vendor frame collapsing
Applied to files:
CLAUDE.mdworkbench/config/solo.phpdocs/configuration.mddocs/commands.mdconfig/solo.phptests/Integration/HotkeyTest.phpdocs/built-in.mdREADME.md
📚 Learning: 2025-11-28T03:14:59.029Z
Learnt from: CR
Repo: soloterm/solo PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T03:14:59.029Z
Learning: Applies to src/Commands/**/*.php : Use soloterm/screen Screen class as a virtual terminal buffer to handle ANSI codes, line wrapping, and maintain printable output
Applied to files:
CLAUDE.mdtests/Unit/ScreenTest.phpworkbench/config/solo.phpdocs/configuration.mdconfig/solo.phpREADME.md
📚 Learning: 2025-11-28T03:14:59.029Z
Learnt from: CR
Repo: soloterm/solo PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T03:14:59.029Z
Learning: Applies to src/Commands/**/*.php : Wrap user commands in GNU Screen for PTY emulation and ANSI handling using the pattern: bash -c 'export LC_ALL=en_US.UTF-8 && stty cols 120 rows 40 && screen -U -q sh -c "printf MARKER; user-command; sleep 0.25; printf MARKER"'
Applied to files:
CLAUDE.mddocs/configuration.mdconfig/solo.php
📚 Learning: 2025-11-28T03:14:59.029Z
Learnt from: CR
Repo: soloterm/solo PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T03:14:59.029Z
Learning: Applies to src/Commands/**/*.php : Support two command modes: MODE_PASSIVE (read-only output) and MODE_INTERACTIVE (forward keyboard input directly to process, exit with Ctrl+X)
Applied to files:
CLAUDE.mddocs/configuration.mdconfig/solo.php
📚 Learning: 2025-11-28T03:14:59.029Z
Learnt from: CR
Repo: soloterm/solo PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T03:14:59.029Z
Learning: Applies to src/Console/Commands/**/*.php : Require GNU Screen >= 5.0.0 and check version on Solo startup with warnings if outdated
Applied to files:
CLAUDE.mddocs/configuration.mdconfig/solo.php
📚 Learning: 2025-11-28T03:14:59.029Z
Learnt from: CR
Repo: soloterm/solo PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T03:14:59.029Z
Learning: Applies to src/Commands/**/*.php : Use ManagesProcess trait to handle subprocess lifecycle including SIGTERM for graceful shutdown (5 second timeout) and SIGKILL for force kill
Applied to files:
CLAUDE.md
📚 Learning: 2025-11-28T03:14:59.029Z
Learnt from: CR
Repo: soloterm/solo PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T03:14:59.029Z
Learning: Applies to src/Hotkeys/**/*.php : Define hotkeys in Hotkeys\DefaultHotkeys.php and Hotkeys\VimHotkeys.php with KeyHandler enum mapping actions to closures, allowing commands to override with custom hotkeys() method
Applied to files:
CLAUDE.mdtests/Integration/HotkeyTest.php
📚 Learning: 2025-11-28T03:14:59.029Z
Learnt from: CR
Repo: soloterm/solo PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T03:14:59.029Z
Learning: Applies to src/Commands/Concerns/ManagesProcess.php : Handle incremental process output collection without blocking using non-blocking process reads in ManagesProcess trait
Applied to files:
CLAUDE.md
📚 Learning: 2025-11-28T03:14:59.029Z
Learnt from: CR
Repo: soloterm/solo PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T03:14:59.029Z
Learning: Applies to src/Commands/**/*.php : Mark commands as lazy via ->lazy() method to prevent automatic startup, requiring manual start with 's' key
Applied to files:
CLAUDE.mddocs/commands.mdREADME.md
📚 Learning: 2025-11-28T03:14:59.029Z
Learnt from: CR
Repo: soloterm/solo PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T03:14:59.029Z
Learning: Applies to src/**/*Tracker*.php : Use ProcessTracker to ensure cleanup of child processes even if Solo crashes, with separate monitor command as additional safety mechanism
Applied to files:
CLAUDE.md
📚 Learning: 2025-11-28T03:14:59.029Z
Learnt from: CR
Repo: soloterm/solo PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T03:14:59.029Z
Learning: Applies to tests/{Unit,Integration}/**/*.php : Focus Unit tests on isolated components (ANSI parsing, wrapping, byte handling) and Integration tests on full command behavior (EnhancedTailCommand)
Applied to files:
CLAUDE.mdtests/Unit/ScreenTest.phptests/Integration/HotkeyTest.php
📚 Learning: 2025-11-28T03:14:59.029Z
Learnt from: CR
Repo: soloterm/solo PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T03:14:59.029Z
Learning: Applies to tests/**/*.php : Use Orchestra Testbench for testing Laravel package components with Unit tests in tests/Unit/ and Integration tests in tests/Integration/
Applied to files:
CLAUDE.md
📚 Learning: 2025-11-28T03:14:59.029Z
Learnt from: CR
Repo: soloterm/solo PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T03:14:59.029Z
Learning: Applies to tests/**/*{Ansi,Unicode,Grapheme,Wrap}*.php : Verify complex ANSI code handling and multibyte character support using soloterm/grapheme for grapheme cluster handling
Applied to files:
CLAUDE.mdtests/Unit/ScreenTest.php
📚 Learning: 2025-11-28T03:14:59.029Z
Learnt from: CR
Repo: soloterm/solo PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T03:14:59.029Z
Learning: Applies to src/Support/**/*.php : Use DiffRenderer to compare previous and current screen states and generate minimal ANSI sequences to update only changed cells for performance optimization
Applied to files:
tests/Unit/ScreenTest.php
📚 Learning: 2025-11-28T03:14:59.029Z
Learnt from: CR
Repo: soloterm/solo PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T03:14:59.029Z
Learning: Applies to config/solo.php : Use Laravel configuration file at config/solo.php to define commands array with command definitions
Applied to files:
workbench/config/solo.phpdocs/configuration.mddocs/commands.mdconfig/solo.phpdocs/installation.mddocs/built-in.mdREADME.md
📚 Learning: 2025-11-28T03:14:59.029Z
Learnt from: CR
Repo: soloterm/solo PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T03:14:59.029Z
Learning: Applies to src/Manager.php : Load commands from config/solo.php during Manager initialization and convert strings/objects to Command instances via Manager->addCommand()
Applied to files:
workbench/config/solo.phpdocs/configuration.mdconfig/solo.phpREADME.md
📚 Learning: 2025-11-28T03:14:59.029Z
Learnt from: CR
Repo: soloterm/solo PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T03:14:59.029Z
Learning: Applies to src/Providers/**/*.php : Use Manager singleton service registered in SoloServiceProvider to load commands, manage themes and hotkeys, and serve as central configuration point
Applied to files:
workbench/config/solo.phpdocs/configuration.mdconfig/solo.phpREADME.md
📚 Learning: 2025-11-28T03:14:59.029Z
Learnt from: CR
Repo: soloterm/solo PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T03:14:59.029Z
Learning: Applies to src/**/*.php : Dispatch internal events via Solo facade for cross-component communication: Event::ActivateTab for programmatic tab switching
Applied to files:
tests/Integration/HotkeyTest.php
🧬 Code graph analysis (2)
tests/Unit/ScreenTest.php (1)
tests/Support/ComparesVisually.php (1)
assertTerminalMatch(38-59)
tests/Integration/HotkeyTest.php (2)
src/Support/AnsiAware.php (1)
plain(20-27)tests/Integration/Base.php (1)
runSolo(77-104)
🪛 PHPMD (2.15.0)
tests/Integration/HotkeyTest.php
53-53: Avoid unused parameters such as '$ansi'. (undefined)
(UnusedFormalParameter)
🔇 Additional comments (11)
docs/installation.md (1)
82-82: LGTM!The description change from "Enhanced log tailing" to "Log file tailing" accurately reflects the shift from EnhancedTailCommand to a standard shell tail command.
docs/built-in.md (1)
138-138: LGTM!The updated text appropriately shifts from referencing the specific EnhancedTailCommand to a generic approach for creating custom command classes, which is more suitable for documentation after removing EnhancedTailCommand.
CLAUDE.md (1)
206-206: LGTM!Removing the specific EnhancedTailCommand reference makes the testing strategy statement more general and aligns with the removal of that class.
README.md (2)
60-60: LGTM!The Logs command correctly uses the shell tail syntax, consistent with the changes across other configuration files.
86-86: LGTM - formatting cleanup.The blank line removal improves consistency in the examples.
workbench/config/solo.php (1)
18-19: LGTM!The comment about soloterm/vtail provides helpful guidance for users who need the enhanced functionality previously offered by EnhancedTailCommand. The shell tail command syntax is correct.
docs/configuration.md (1)
52-53: LGTM!The configuration documentation correctly reflects the removal of EnhancedTailCommand and provides helpful guidance about the soloterm/vtail alternative for users who need enhanced features.
tests/Unit/ScreenTest.php (1)
729-731: Fixture file verified and ready for testing.The fixture file
tests/Fixtures/simple-multiline-test.logexists and contains appropriate test data (5 lines of multiline log content). The old fixture has been properly removed. The test is correctly configured.tests/Integration/HotkeyTest.php (2)
18-39: LGTM!The test correctly validates vim keybindings and has been appropriately updated to use the plain tail command instead of EnhancedTailCommand.
42-64: Test logic correctly validates tab navigation.The renamed test method appropriately verifies arrow key navigation between tabs (Right arrow → Logs, Left arrow → About). The update to use the plain tail command is consistent with the PR's removal of EnhancedTailCommand.
Note: The static analysis warning about the unused
$ansiparameter on line 53 is a false positive—the closure signature is defined by the test framework in theBaseclass, and using only$plainfor assertions is the expected pattern throughout this test file.config/solo.php (1)
49-50: Simplified log viewing with helpful guidance.The change from EnhancedTailCommand to a plain shell tail command reduces complexity and removes dependencies. The comment appropriately directs users to soloterm/vtail for enhanced features like vendor frame collapsing.
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.