Summary
Left-clicking a long URL in the chat transcript (especially a wrapped GitHub commit link with hyphens in the host) can open a truncated URL in the browser, for example https://github.com/Cod instead of the full commit href.
URL styling (underline, wrap at path boundaries) works. Click-to-open does not reliably open the full URL in real terminals.
Reproduction
- Build and run the client from current
main (go build -o marchat . then run the client binary).
- Connect to a server and post (or receive) a message containing a long URL, for example:
https://github.com/Cod-e-Codes/marchat/commit/e579461ea4d75e8f4971bcf6095342f7fa2205e1
- Use a narrow terminal width so the URL wraps across two or more transcript lines (default layout with user list is often enough).
- Left-click the underlined URL on the first line (on the
Cod segment).
Expected
The default browser opens the full commit URL.
Actual
The browser opens a truncated prefix such as https://github.com/Cod.
Environment
- OS: Windows, macOS, or Linux (reported on Windows)
- Terminal: Windows Terminal or similar with mouse reporting
- marchat:
main after URL click work (not limited to v1.2.0 tag)
- Server rebuild is not required; this is client-side only
Technical notes
Current approach (client/websocket.go, client/render.go):
- Underline/color via Lip Gloss styles only (no OSC 8 hyperlink sequences;
lipgloss v1.1 in go.mod has no Style.Hyperlink API).
- Mouse handler maps terminal coordinates through
chatPanelOrigin() (header, optional banner, chat box border) into viewport.View() lines, then regex/stitch/buildTranscriptLineURLs/expandClickedURL.
Headless unit tests (client/render_test.go, client/main_test.go) pass but do not model lipgloss box chrome or real emulator click behavior end-to-end.
Proposed direction (not implemented)
Per terminal hyperlink practice (OSC 8, documented by egmontkob and Charm Lip Gloss issue #220 / v2 Hyperlink API):
- Emit OSC 8 with the full URL on each visible wrapped segment when the terminal supports it.
- Let the emulator handle click when possible; keep
openURL + coordinate fallback only where needed.
- Add manual test steps in
TESTING.md and optional integration test with recorded terminal layout if feasible.
Workaround
Copy the URL from the message text.
Related docs
ARCHITECTURE.md (client URL section)
ROADMAP.md Phase 7
TESTING.md Manual testing gaps
Summary
Left-clicking a long URL in the chat transcript (especially a wrapped GitHub commit link with hyphens in the host) can open a truncated URL in the browser, for example
https://github.com/Codinstead of the full commit href.URL styling (underline, wrap at path boundaries) works. Click-to-open does not reliably open the full URL in real terminals.
Reproduction
main(go build -o marchat .then run the client binary).https://github.com/Cod-e-Codes/marchat/commit/e579461ea4d75e8f4971bcf6095342f7fa2205e1Codsegment).Expected
The default browser opens the full commit URL.
Actual
The browser opens a truncated prefix such as
https://github.com/Cod.Environment
mainafter URL click work (not limited to v1.2.0 tag)Technical notes
Current approach (
client/websocket.go,client/render.go):lipglossv1.1 ingo.modhas noStyle.HyperlinkAPI).chatPanelOrigin()(header, optional banner, chat box border) intoviewport.View()lines, then regex/stitch/buildTranscriptLineURLs/expandClickedURL.Headless unit tests (
client/render_test.go,client/main_test.go) pass but do not model lipgloss box chrome or real emulator click behavior end-to-end.Proposed direction (not implemented)
Per terminal hyperlink practice (OSC 8, documented by egmontkob and Charm Lip Gloss issue #220 / v2
HyperlinkAPI):openURL+ coordinate fallback only where needed.TESTING.mdand optional integration test with recorded terminal layout if feasible.Workaround
Copy the URL from the message text.
Related docs
ARCHITECTURE.md(client URL section)ROADMAP.mdPhase 7TESTING.mdManual testing gaps