-
Notifications
You must be signed in to change notification settings - Fork 3
feat(output): Enhanced output formatting with hyperlinks, ASCII mode, and strict YAML #121
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
Merged
Conversation
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
Timpan4
approved these changes
Jan 10, 2026
Contributor
Timpan4
left a 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.
LGTM!
- Display current Assignee in regular task show output - Display assignee change history when using --show-history flag - Resolve user PHIDs to usernames for readable output Changes: - Add need_assignee parameter to _fetch_all_transactions() - Handle reassign/core:owner transaction types - Add _build_assignee_transitions() method - Include Assignee field in Task section - Include Assignee section in History output Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add two global CLI options for terminal output formatting: - --ascii=WHEN: Use ASCII characters instead of Unicode symbols (always/auto/never, default: auto) - --hyperlink=WHEN: Enable OSC 8 terminal hyperlinks (always/auto/never, default: auto) Auto-detection: - ASCII: Enabled when stdout is not a TTY or locale is not UTF-8 - Hyperlink: Enabled for known supporting terminals (iTerm, WezTerm, Ghostty, Kitty, Alacritty, GNOME Terminal, Konsole, Windows Terminal) Unicode to ASCII mappings: • → *, ↑ → ^, ↓ → v, → → >, ← → < Hyperlinks are printed directly to stdout to bypass YAML escaping, ensuring escape sequences render correctly in supporting terminals. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When --hyperlink is enabled, make additional fields clickable: - Assignee: Links to user profile (/p/username/) - Board names: Links to project tag page (/tag/project-slug/) Updated format_link() to support show_url parameter - when False, returns text instead of URL when hyperlinks are disabled. This keeps YAML output valid (no colons in dict keys). Also fixed _build_assignee_transitions() to use format_direction() for ASCII mode support, and improved YAML output to properly quote values containing special characters (colons, braces). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Column names in Boards section now link to Maniphest query filtered
by that column using URL format: /maniphest/?columns={column_phid}
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Show brief usage line when no search criteria provided - Add __str__ methods to pattern classes for readable log output - Improve filter log messages to show actual filter values - Combine tag resolution and AND/OR logic into single log message - Change single task history fetch log from INFO to DEBUG - Simplify exception message (CLI now handles usage display) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use log.critical() in cli.py instead of print() for consistent output - Align pre-logging error format in __init__.py to use "CRITICAL - " - Ensures all error messages follow the same logging format Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add a failsafe by supporting three output formats:
- rich (default): YAML-like format using Rich library with hyperlinks
and manual quoting for special characters
- tree: Visual tree format using Rich Tree
- strict: Guaranteed conformant YAML via ruamel.yaml for piping to yq/jq
Changes:
- Rename --format=yaml to --format=rich
- Add --format=strict using ruamel.yaml for guaranteed valid YAML
- Add _display_task_strict() method for strict YAML output
- Add _needs_yaml_quoting() to detect special chars: :{}[]`'"
- Add MAX_LINE_WIDTH constant and check_line_width() to fail if a line
exceeds the maximum width in rich format
- Add mutual exclusivity check for --format=strict with --hyperlink=always
- Fix hyperlink auto-detection to work with Rich Console
- Add comprehensive tests for YAML quoting and strict format
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add task ID validation in CLI using MONOGRAMS pattern - Fix logging by setting disable_existing_loggers=False in dictConfig - Handle BrokenPipeError when output is piped to head/less - Standardize error messages across passphrase, paste, and maniphest: "Invalid <type> ID '<id>'. Expected format: <example>" - Move MONOGRAMS import to top of cli.py Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
6a17d57 to
f93f598
Compare
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.
Summary
--asciiand--hyperlinkCLI options for terminal compatibilityrich(default),tree, andstrict(guaranteed valid YAML)New CLI Options
Visual Demo
The task link, workboard and column is clickable OSC8-style. The blue URL is a "regular" clickable URL, but it is nicely colored.
Test plan
uv run tox --skip-missing-interpreters- all tests passphabfive maniphest show T1with all three formatsphabfive maniphest show '*')yqfor all tasks🤖 Generated with Claude Code