Update shellv2 other-stream output format with blue username tag#1896
Update shellv2 other-stream output format with blue username tag#1896
Conversation
…red username and full command. - Modified `tavern/internal/http/shell/handler.go` to format "other stream" output as `\x1b[34m[@<USER_NAME>]\x1b[0m[+] <COMMAND>`. - Removed truncation of the input command in the "other stream" output header. - Updated `tavern/internal/http/shell/integration_test.go` to verify the new output format and ANSI color codes. Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Summary
Previous Results
Insights
Slowest Tests
🎉 No failed tests in this run. | 🍂 No flaky tests in this run. Github Test Reporter by CTRF 💚 🔄 This comment has been updated |
- Modified `tavern/internal/http/shell/handler.go` to format "other stream" output as `\x1b[34m[@<USER_NAME>]\x1b[0m[+] <TRUNCATED_INPUT>\n`. - Updated `pollForShellTasks` to correctly identify and format tasks from other streams, ensuring historical/polled data is displayed correctly. - Added `TestOtherStreamOutput_Polling` and updated `TestOtherStreamOutput` in `tavern/internal/http/shell/integration_test.go` to verify formatting, truncation, and polling behavior. Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>
- Modified `tavern/internal/portals/integration_test.go` to generate a unique SQLite database name based on the test name for each test run. - This resolves the "database table is locked: portals" error caused by concurrent tests attempting to access the same shared "ent" in-memory database. Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>
- Fixed `TestPortalClose` flake in `tavern/internal/portals/integration_test.go` by using unique in-memory DB names per test. - Confirmed basic functionality preserved via user screenshot. - Changes for `shellv2` output format (blue user tag + truncation) remain validated by `TestOtherStreamOutput` tests. Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>

This change updates the
shellv2output format when displaying commands executed by other users in the same shell session.Previously, the output was formatted as
[+] [<USER_NAME>] Task Output for <TRUNCATED_COMMAND>.The new format is
[@<USER_NAME>][+] <COMMAND>, where[@<USER_NAME>]is colored blue using ANSI escape codes (\x1b[34m). This improves visibility and distinguishes commands run by others. The command is also no longer truncated in the header, ensuring the full context is visible.Verification:
go test -v tavern/internal/http/shell/integration_test.go -run TestOtherStreamOutputwhich passed.PR created automatically by Jules for task 1952170298998639824 started by @KCarretto