Skip to content

Add back navigation link to action run view#36721

Draft
silverwind wants to merge 2 commits into
go-gitea:mainfrom
silverwind:wflink
Draft

Add back navigation link to action run view#36721
silverwind wants to merge 2 commits into
go-gitea:mainfrom
silverwind:wflink

Conversation

@silverwind
Copy link
Copy Markdown
Member

@silverwind silverwind commented Feb 23, 2026

  1. Add <- workflowId link on top of the title goes the the workflow's run list. This uses filename minus extension because workflow.name is unfortunately not available in the database.
  2. The filename.yaml link now points to the workflow source file.
  3. Slightly tweaked icon size and spacing.
  4. Line-height tweaked on description line so labels don't stretch so much.
  5. Total height consumed by the header is about 4px more than before.

Before:

image

After:

image

The workflow filename in the commit summary now links to the workflow
source file. A back-arrow link above the title navigates to the
workflow's runs list, similar to GitHub's UI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 23, 2026
@silverwind silverwind added the type/enhancement An improvement of existing functionality label Feb 23, 2026
@silverwind silverwind requested a review from Copilot February 23, 2026 06:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Actions run view header UI to add a “back to workflow runs” navigation link and adjust the workflow file link/visual spacing.

Changes:

  • Add a back navigation link (<- workflowId) at the top of the Actions run header.
  • Update the workflowID link to point to the workflow source file view (/actions/runs/{run}/workflow).
  • Tweak header icon sizing and spacing/layout CSS.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
web_src/js/svg.ts Registers the octicon-arrow-left SVG for use in the new back link.
web_src/js/components/RepoActionView.vue Adds back link + updates workflow link target; adjusts header layout and icon sizing.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

<!-- make the view container full width to make users easier to read logs -->
<div class="ui fluid container">
<div class="action-view-header">
<a class="action-view-back" :href="run.workflowLink"><SvgIcon name="octicon-arrow-left"/> {{ run.workflowID.replace(/\.(yml|yaml)$/i, '') }}</a>
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new back link is rendered unconditionally, but run.workflowLink/run.workflowID are initialized as empty strings. Until loadJob() finishes, this produces a clickable <a> with an empty href and no text (only the icon), which can cause an accidental reload/navigation. Consider guarding the link with v-if (e.g. only render when run.workflowLink and run.workflowID are set) or otherwise disabling it until data is loaded.

Suggested change
<a class="action-view-back" :href="run.workflowLink"><SvgIcon name="octicon-arrow-left"/> {{ run.workflowID.replace(/\.(yml|yaml)$/i, '') }}</a>
<a v-if="run.workflowLink && run.workflowID" class="action-view-back" :href="run.workflowLink"><SvgIcon name="octicon-arrow-left"/> {{ run.workflowID.replace(/\.(yml|yaml)$/i, '') }}</a>

Copilot uses AI. Check for mistakes.
</div>
<div class="action-commit-summary">
<span><a class="muted" :href="run.workflowLink"><b>{{ run.workflowID }}</b></a>:</span>
<span><a class="muted" :href="`${run.link}/workflow`"><b>{{ run.workflowID }}</b></a>:</span>
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

href="${run.link}/workflow" will evaluate to /workflow while run.link is still the initial empty string, creating a valid-looking link to the site root before the run data loads. Please guard this link until run.link is populated (or compute the href to return an empty/disabled value when run.link is empty).

Suggested change
<span><a class="muted" :href="`${run.link}/workflow`"><b>{{ run.workflowID }}</b></a>:</span>
<span><a class="muted" :href="run.link ? `${run.link}/workflow` : undefined"><b>{{ run.workflowID }}</b></a>:</span>

Copilot uses AI. Check for mistakes.
@silverwind
Copy link
Copy Markdown
Member Author

silverwind commented Feb 23, 2026

Not totally satisfied with the vertical spacing, it will need more tweaks. Maybe I will also check what's needed to get workflow.name accessible in that component.

@silverwind silverwind marked this pull request as draft February 23, 2026 06:20
@silverwind silverwind mentioned this pull request Apr 1, 2026
@bircni
Copy link
Copy Markdown
Member

bircni commented Apr 1, 2026

Would also be cool to navigate back to the pr or wherever you came from

@bircni
Copy link
Copy Markdown
Member

bircni commented Apr 1, 2026

Could you continue this 🥹?

@silverwind
Copy link
Copy Markdown
Member Author

Would also be cool to navigate back to the pr or wherever you came from

Do you have a example link of a to-PR navigation working in GitHub UI? As far as I'm aware, they have no working to-PR navigation link.

@silverwind
Copy link
Copy Markdown
Member Author

Could you continue this 🥹?

Let's merge #37070 first, then remove the workflow file link here.

@bircni
Copy link
Copy Markdown
Member

bircni commented Apr 1, 2026

Do you have a example link of a to-PR navigation working in GitHub UI? As far as I'm aware, they have no working to-PR navigation link.

Bildschirmfoto 2026-04-01 um 11 57 09 https://github.com/go-gitea/gitea/actions/runs/22295037234/job/64489830422?pr=36721

@silverwind
Copy link
Copy Markdown
Member Author

Thanks, yes that should be implemented along with the "back to run list". Same element, just a different link.

@silverwind
Copy link
Copy Markdown
Member Author

TODO:

  • Remove workflow link, now handled via Show workflow link #37070
  • Fix CSS issues
  • Investigate adding a "back to pull request" link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. type/enhancement An improvement of existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants