From 2c5da000d8b40f0f707c02f3f18a16d14da8d78b Mon Sep 17 00:00:00 2001 From: opariffazman Date: Fri, 29 May 2026 18:21:40 +0800 Subject: [PATCH 1/2] feat(ui): add GitHub source link button top-right Icon-only link to the repo, styled to match ResetButton. Uses an inline octicon mark (no icon-collection dep, works offline in the PWA build). Opens in a new tab with rel=noopener to prevent tabnabbing. Desktop ASCII logo nudged left (right-16) so it clears the corner button. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/ui/GithubLink.svelte | 29 +++++++++++++++++++++++++++++ src/ui/Layout.svelte | 13 ++++++++++--- tests/e2e/a11y.spec.ts | 8 ++++++++ 3 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 src/ui/GithubLink.svelte diff --git a/src/ui/GithubLink.svelte b/src/ui/GithubLink.svelte new file mode 100644 index 0000000..2ded9a7 --- /dev/null +++ b/src/ui/GithubLink.svelte @@ -0,0 +1,29 @@ + + + + + diff --git a/src/ui/Layout.svelte b/src/ui/Layout.svelte index b8b0942..632eb13 100644 --- a/src/ui/Layout.svelte +++ b/src/ui/Layout.svelte @@ -2,17 +2,24 @@ import Terminal from './Terminal.svelte'; import Graph from './Graph.svelte'; import ResetButton from './ResetButton.svelte'; + import GithubLink from './GithubLink.svelte';
- +
- + +
+ +
+ +
{` ██████╗ ██╗████████╗██╗   ██╗███████╗██████╗ ███████╗███████╗
+    class="absolute top-3 right-16 z-10 font-mono text-terminal-dim/80 text-xs leading-tight select-none pointer-events-none max-sm:hidden">{` ██████╗ ██╗████████╗██╗   ██╗███████╗██████╗ ███████╗███████╗
 ██╔════╝ ██║╚══██╔══╝██║   ██║██╔════╝██╔══██╗██╔════╝██╔════╝
 ██║  ███╗██║   ██║   ██║   ██║█████╗  ██████╔╝███████╗█████╗
 ██║   ██║██║   ██║   ╚██╗ ██╔╝██╔══╝  ██╔══██╗╚════██║██╔══╝
diff --git a/tests/e2e/a11y.spec.ts b/tests/e2e/a11y.spec.ts
index c45eb18..7e9e636 100644
--- a/tests/e2e/a11y.spec.ts
+++ b/tests/e2e/a11y.spec.ts
@@ -170,3 +170,11 @@ test('unknown command shows a dim hint line', async ({ page }) => {
   await expect(page.getByText(/command not found/)).toBeVisible();
   await expect(page.getByText(/type 'help' to see available commands/)).toBeVisible();
 });
+
+test('GitHub source link points to the repo in a safe new tab', async ({ page }) => {
+  const link = page.getByRole('link', { name: 'View source on GitHub' });
+  await expect(link).toHaveAttribute('href', 'https://github.com/opariffazman/gitverse');
+  await expect(link).toHaveAttribute('target', '_blank');
+  // Opener isolation so the new tab can't navigate this one (tabnabbing).
+  await expect(link).toHaveAttribute('rel', /noopener/);
+});

From c4a79b110924b9ba71751d6272af1bcc467d2df6 Mon Sep 17 00:00:00 2001
From: opariffazman 
Date: Fri, 29 May 2026 18:21:45 +0800
Subject: [PATCH 2/2] 0.8.0-rc.0

---
 package-lock.json | 4 ++--
 package.json      | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/package-lock.json b/package-lock.json
index 9e57b83..f6483f3 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
 {
   "name": "gitverse",
-  "version": "0.7.0",
+  "version": "0.8.0-rc.0",
   "lockfileVersion": 3,
   "requires": true,
   "packages": {
     "": {
       "name": "gitverse",
-      "version": "0.7.0",
+      "version": "0.8.0-rc.0",
       "dependencies": {
         "d3-dag": "1.2.1",
         "d3-hierarchy": "3.1.2",
diff --git a/package.json b/package.json
index d8e6bc5..bd1cba2 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "gitverse",
-  "version": "0.7.0",
+  "version": "0.8.0-rc.0",
   "private": true,
   "type": "module",
   "scripts": {