diff --git a/docs/plan/08-web-ui.md b/docs/plan/08-web-ui.md index 33ff3c7..c1c0c00 100644 --- a/docs/plan/08-web-ui.md +++ b/docs/plan/08-web-ui.md @@ -80,3 +80,7 @@ Deviation: the listing enumerates origin branches instead of legacy's local bran Addendum (2026-07-07): the legacy per-page reload button (`⟳`, top right) was also re-added on request, next to the live indicator. On polling pages it triggers an immediate data refresh via the page's poller; pages without a poller (artifact index) reload fully. + +Addendum (2026-07-07): all links that leave the GitTally UI open in a new tab (`target="_blank" rel="noopener noreferrer"`). +This already held for Gitea branch/commit links and the footer; it was added for the artifact page's log and report links, whose targets have no navigation. +Links between GitTally pages (nav, artifact index) stay in the same tab. diff --git a/src/main/resources/templates/artifact.html b/src/main/resources/templates/artifact.html index 2230b75..aaf1e9c 100644 --- a/src/main/resources/templates/artifact.html +++ b/src/main/resources/templates/artifact.html @@ -45,7 +45,8 @@

Logs

@@ -56,8 +57,8 @@

Build Artifacts

diff --git a/src/test/kotlin/de/hoennig/gittally/server/UiControllerTest.kt b/src/test/kotlin/de/hoennig/gittally/server/UiControllerTest.kt index fefce70..db8bf78 100644 --- a/src/test/kotlin/de/hoennig/gittally/server/UiControllerTest.kt +++ b/src/test/kotlin/de/hoennig/gittally/server/UiControllerTest.kt @@ -210,10 +210,11 @@ class UiControllerTest : FunSpec() { .perform(get("/builds/main-abc123-key")) .andExpect(status().isOk) .andExpect(content().string(containsString("./gradlew --console=plain --no-daemon test"))) - .andExpect(content().string(containsString("/artifacts/main-abc123-key/build.stdout.log"))) + .andExpect(content().string(containsString("""/artifacts/main-abc123-key/build.stdout.log" target="_blank""""))) .andExpect(content().string(containsString("/artifacts/main-abc123-key/build.stderr.log"))) - .andExpect(content().string(containsString("reports/tests/test/index.html"))) - .andExpect(content().string(not(containsString("reports/tests/test/packages/index.html")))) + .andExpect( + content().string(containsString("""/artifacts/main-abc123-key/reports/tests/test/index.html" target="_blank"""")), + ).andExpect(content().string(not(containsString("reports/tests/test/packages/index.html")))) } test("artifact index of a pruned build explains the missing artifacts") {