-
Notifications
You must be signed in to change notification settings - Fork 602
Add automatic URL detection and clickability in transcript messages #256
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
When using happy-web to start a new session, clicking the machine name to change it and then selecting a different machine would cause the selection to revert back to the original machine. Root cause: Module-level callback pattern had race conditions in web environments where router.back() could complete before state updates propagated. Fix: Pass selectedMachineId explicitly via route params when navigating back from machine picker. This ensures the selection is guaranteed to be available when the component mounts. Also exclude test files from metro bundler to prevent vitest from being bundled into the web app. Tests: Added machineSelection.spec.ts with 9 tests covering the bug reproduction, callback race conditions, and route param solution. 🤖 Generated with [Claude Code](https://claude.com/claude-code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
This workflow runs tests and auto-deploys happy-cli to the nelnet production server. Features: - Tests run on GitHub-hosted runners (typecheck, build, test) - Deployment runs on self-hosted runner (nelnet server) - Supports main, master, and fix/pass-tests branches - Dynamically deploys the branch that triggered the workflow - Restarts happy daemon with health check verification Deployment steps: 1. Pull latest code to /home/ben/src/happy/happy-cli 2. Install dependencies and build 3. Restart happy daemon 4. Verify daemon health on port 3005 🤖 Generated with [Claude Code](https://claude.com/claude-code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
Only happy-private should use nelnet-ci for automated deployments. The public fork (nelsonblaha/happy) is only for upstream contributions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
Per software development standards, bug documentation should not be committed to source code repositories. Use git commit messages, issue trackers, or external documentation instead. 🤖 Generated with [Claude Code](https://claude.com/claude-code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
This update enhances the markdown parser to automatically detect and convert plain URLs into clickable links that open in new tabs. Changes: - Added URL pattern detection for http://, https://, and www. URLs in parseMarkdownSpans.ts - Created splitTextWithUrls() helper function to identify URLs in plain text - URLs starting with www. are automatically prefixed with https:// - Added rel="noopener noreferrer" to Link component for improved security - URLs in markdown links [text](url) continue to work as before - URLs in code blocks remain as plain text (not clickable) Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
This adds 33 tests covering: - Basic URL detection (https://, http://, www.) - Multiple URLs in one line - URLs with paths, query parameters, and fragments - Interaction with existing markdown formatting - Text preservation around URLs - Edge cases (ports, subdomains, hyphens, etc.) - Real-world examples (GitHub, docs, APIs, Yahoo) - Backward compatibility with existing markdown functionality All tests pass, confirming the URL detection feature works correctly without breaking existing markdown parsing behavior. Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
Tests Added ✅I've added comprehensive test coverage for the URL detection feature:
All tests pass ✅ The tests confirm that the URL detection feature works correctly without breaking any existing markdown parsing behavior. |
Issue Search ResultsI searched through the upstream repository's issues and didn't find any existing feature requests for clickable URLs in the transcript. This appears to be a proactive quality-of-life improvement rather than addressing a specific reported issue. Related observations:
The feature enhances usability by automatically making URLs clickable without requiring users to manually format them as markdown links |
Related Pull RequestsI searched for similar PRs and found: PR #232 - Markdown Enhancements (OPEN)
PR #82 - Markdown Copy (MERGED)
Analysis:
Our changes are focused and isolated to URL detection logic, making them compatible with other markdown improvements. |
Summary
This PR enhances the markdown parser to automatically detect and convert plain URLs into clickable links that open in new tabs.
Changes
http://,https://, andwww.URLs inparseMarkdownSpans.tssplitTextWithUrls()helper function to identify URLs in plain textwww.are automatically prefixed withhttps://rel="noopener noreferrer"to Link component for improved security[text](url)continue to work as beforeMotivation
Users frequently share URLs in conversations, and having to manually format them as markdown links (
[text](url)) is inconvenient. This change makes plain URLs automatically clickable, improving the user experience.Testing
https://example.com,http://example.com, andwww.example.comare now automatically detected and clickableExample
Before:
Check out https://example.com for more info(not clickable)After:
Check out https://example.com for more info(clickable, opens in new tab)Generated with Claude Code
via Happy