Add link to action_url - #6746
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Hackbot UI’s RunDetail actions list to surface a per-action external link when an action includes a result.url, enabling users to open related records in external systems.
Changes:
- Add an
actionUrlhelper to extract an optional action result URL. - Render an “Open” external link next to each action when a URL is present.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
|
||
| //Every action may have a result.url, which is a link to the external system (e.g. Bugzilla) where the action was applied. | ||
| // We surface that as an "Open" link in the actions list. | ||
| function actionUrl(a: RunAction): string | null { |
There was a problem hiding this comment.
Why do we need this function? I guess we could use the URL as it is. WDYT?
There was a problem hiding this comment.
Only some action types return a link, so without the check we would render a dead "Open" link. Keeping it as a named function matches commentPreview right above it and similar to the rest of the helpers in the file. I was going to make it inline, but I thought its better to keep it consistent with the rest.
Fixes #6473
This pull request enhances the
RunDetailcomponent by adding support for displaying external links associated with each action. Now, if an action contains aresult.url, an "Open" link will be shown, allowing users to easily access the related external system (such as Bugzilla, TestRail).