Skip to content

Conversation

@kilosculptor
Copy link

This PR adds clickable hyperlink functionality to diff IDs displayed in arc flow output.

Changes

  • Add PhutilConsoleFormatter class with formatHyperlink() method
  • Update ICFlowMonogramField to render clickable diff IDs (D123)
  • Uses OSC 8 terminal hyperlinks for supported terminals
  • Gracefully falls back to plain text in unsupported terminals
  • Configurable base URL via UBER_DIFFERENTIAL_BASE_URL environment variable
  • Defaults to https://code.uberinternal.com

Testing

  • Tested hyperlink generation with proper OSC 8 escape sequences
  • Verified graceful fallback when ANSI is disabled
  • All syntax checks pass

Users can now click on diff IDs in arc flow output to open them directly in their browser (in supported terminals like iTerm2, VS Code terminal, etc.).

- Add PhutilConsoleFormatter class with formatHyperlink() method
- Update ICFlowMonogramField to render clickable diff IDs (D123)
- Uses OSC 8 terminal hyperlinks for supported terminals
- Gracefully falls back to plain text in unsupported terminals
- Configurable base URL via UBER_DIFFERENTIAL_BASE_URL environment variable
- Defaults to https://code.uberinternal.com

Users can now click on diff IDs in arc flow output to open them in browser.
- Add PhutilConsoleFormatterTestCase with tests for:
  - formatHyperlink() method with OSC 8 sequences
  - ANSI enable/disable functionality
  - Edge cases and format string methods
  - Text escaping/unescaping

- Add ICFlowMonogramFieldTestCase with tests for:
  - Field key and configuration methods
  - Value rendering with and without hyperlinks
  - URL building and base URL configuration
  - Environment variable support
  - Edge cases and error conditions

All tests pass and verify proper functionality of the clickable
diff ID feature in arc flow output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant