From 6c42f2f6c91898ee0c14e7a40b7b916aba9bf430 Mon Sep 17 00:00:00 2001 From: Vaayne Date: Wed, 24 Jun 2026 12:12:51 +0800 Subject: [PATCH 1/3] =?UTF-8?q?docs:=20GitHub=20=E9=9B=86=E6=88=90?= =?UTF-8?q?=E6=96=B9=E6=A1=88=20mockup=EF=BC=88Tier=201=20gh=20dash=20+=20?= =?UTF-8?q?Tier=202=20PR=20=E7=8A=B6=E6=80=81=E6=9D=A1=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 两层方案的可视化提案,不嵌 github.com WebView: - Tier 1: gh dash 作为 companion tool 复用 lazygit 架构 - Tier 2: worktree 行下挂 PR 状态条,绑定 branch 仅 mockup,无功能代码。 --- docs/mockups/github-integration.html | 330 +++++++++++++++++++++++++++ docs/mockups/github-integration.md | 32 +++ 2 files changed, 362 insertions(+) create mode 100644 docs/mockups/github-integration.html create mode 100644 docs/mockups/github-integration.md diff --git a/docs/mockups/github-integration.html b/docs/mockups/github-integration.html new file mode 100644 index 0000000..f12398b --- /dev/null +++ b/docs/mockups/github-integration.html @@ -0,0 +1,330 @@ + + + + + +Mori · GitHub 集成 Mockup + + + +
+

Mori · GitHub 集成 mockup

+
+ + + +
+
+ +
+
+
+
mori — feat/sidebar-redesign
+
⌘K⌥G
+
+ +
+ + + + +
+
mori feat/sidebar-redesign ~/workspace/mori
+
❯ swift build
+
Building for debugging...
+
[142/142] Compiling Mori MainWindowController.swift
+
Build complete! (8.41s)
+
+
gh pr checks 91
+
build-and-test 2m13s
+
swiftlint 14s
+
bundle-app 1m02s
+
 
+
+ + +
+
+ + gh dash — mori + ⌥G +
+
+
+ My Pull Requests + Needs Review + Issues +
+
+ + #91 + redesign the sidebar — calmer, two levels + ●12 ✓ +
+
+ + #88 + fix tmux session list + switching + ◷3 +
+
+ + #93 + MoriGitHub: gh dash + PR strip mockup + draft +
+
+ + #84 + MoriRemote: rework key bar by role + ●2 ✓✓ +
+
+ + #82 + MoriIPC: SSH endpoint reconnect backoff + running +
+
+ checkout + o browser + c comment + d diff + / filter +
+
+
+
+
+ +
+ Tier 1gh dash 作为 companion tool 跑在右侧面板,⌥G 唤起,复用 lazygit 那套架构 + Tier 2 — 每个 worktree 行下挂一条 PR 状态条:编号 / 状态 / CI checks,绑定当前 branch +
+ + + + diff --git a/docs/mockups/github-integration.md b/docs/mockups/github-integration.md new file mode 100644 index 0000000..9cfede5 --- /dev/null +++ b/docs/mockups/github-integration.md @@ -0,0 +1,32 @@ +# GitHub 集成 — 提案 mockup + +> 配套可视化:[`github-integration.html`](./github-integration.html)(浏览器打开,顶部按钮切换 Tier 1 / Tier 2 / 叠加) + +让 Mori 更好地管理 PR,但**不**嵌 github.com 整页 WebView(认证两套 token、不 native、脱离 worktree 上下文)。分两层落地。 + +## Tier 1 — `gh dash` 作为 companion tool(性价比最高,先做) + +把官方扩展 [`gh dash`](https://github.com/dlvhdr/gh-dash) 当成一个内嵌 TUI,跑在右侧 ~420pt 的 companion pane,⌥G 唤起 —— 完全复用现有的 lazygit 集成架构(`CompanionToolPaneController`)。 + +- 新增 `CompanionTool.githubDash` 枚举值 + 一个键位,几乎零新 UI。 +- PR / Issue 列表、review 队列、checkout、评论、看 diff,全在终端里。 +- 前提:用户已装 `gh` 和 `gh-dash` 扩展(启动时探测,缺了给一行提示)。 + +## Tier 2 — worktree PR 状态条(小幅 native,让它有上下文) + +每个 worktree 行下挂一条 PR 状态条,绑定该 branch: + +- `gh pr view --json number,state,statusCheckRollup,reviewDecision` +- 显示 编号 / 状态(open·draft·review)/ CI checks(✓ ✕ ●)。 +- 点击 → checkout 或 `gh pr view --web`。 +- 新建 `MoriGitHub` 包,沿用 `MoriGit` 的 actor + 轮询模式(`GitStatusCoordinator` 同款)。 + +这是 Mori 比裸 `gh` 强的地方:把 GitHub 状态钉在 worktree 上。 + +## 暂不做 — Tier 3 富 PR WebView + +真要内嵌富 diff / review 线程,再考虑只嵌**单个 PR URL** 的 WKWebView(注入 `gh auth token`)。先验证前两层需求,大概率发现不需要。 + +--- + +**本 PR 只含 mockup,无功能代码。** 确认方向后再分 Tier 实现。 From e7c7f0a5a3d7dd21cfeb8dde972478dc77860b64 Mon Sep 17 00:00:00 2001 From: Vaayne Date: Wed, 24 Jun 2026 12:52:42 +0800 Subject: [PATCH 2/3] =?UTF-8?q?docs:=20gh=20dash=20=E7=94=A8=20=E2=8C=98?= =?UTF-8?q?=E2=87=A7G=EF=BC=8C=E6=BE=84=E6=B8=85=E4=B8=8E=20lazygit(?= =?UTF-8?q?=E2=8C=98G)/yazi(=E2=8C=98E)=20=E5=85=B1=E7=94=A8=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=E4=BA=92=E5=88=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/mockups/github-integration.html | 4 ++-- docs/mockups/github-integration.md | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/mockups/github-integration.html b/docs/mockups/github-integration.html index f12398b..ea6d78f 100644 --- a/docs/mockups/github-integration.html +++ b/docs/mockups/github-integration.html @@ -180,7 +180,7 @@

Mori · GitHub 集成 mockup

mori — feat/sidebar-redesign
-
⌘K⌥G
+
⌘K⌘G⌘⇧G
@@ -262,7 +262,7 @@

Mori · GitHub 集成 mockup

gh dash — mori - ⌥G + ⌘⇧G
diff --git a/docs/mockups/github-integration.md b/docs/mockups/github-integration.md index 9cfede5..ce73278 100644 --- a/docs/mockups/github-integration.md +++ b/docs/mockups/github-integration.md @@ -6,9 +6,10 @@ ## Tier 1 — `gh dash` 作为 companion tool(性价比最高,先做) -把官方扩展 [`gh dash`](https://github.com/dlvhdr/gh-dash) 当成一个内嵌 TUI,跑在右侧 ~420pt 的 companion pane,⌥G 唤起 —— 完全复用现有的 lazygit 集成架构(`CompanionToolPaneController`)。 +把官方扩展 [`gh dash`](https://github.com/dlvhdr/gh-dash) 当成一个内嵌 TUI,跑在右侧 ~420pt 的 companion pane,**⌘⇧G** 唤起 —— 完全复用现有的 lazygit 集成架构(`CompanionToolPaneController`)。 -- 新增 `CompanionTool.githubDash` 枚举值 + 一个键位,几乎零新 UI。 +- 新增 `CompanionTool.githubDash` 枚举值 + `tools.ghDash` 键位(⌘⇧G),几乎零新 UI。 +- **lazygit(⌘G)/ yazi(⌘E)完全不动**:三者平级共用一个面板,按各自键互相切换,和现状逻辑一致。 - PR / Issue 列表、review 队列、checkout、评论、看 diff,全在终端里。 - 前提:用户已装 `gh` 和 `gh-dash` 扩展(启动时探测,缺了给一行提示)。 From 0fb35e51e04158279b51b216b668296bf00df3a2 Mon Sep 17 00:00:00 2001 From: Vaayne Date: Wed, 24 Jun 2026 12:55:01 +0800 Subject: [PATCH 3/3] =?UTF-8?q?docs:=20Tier=202=20PR=20=E6=9D=A1=E4=BB=85?= =?UTF-8?q?=E9=80=89=E4=B8=AD=E8=A1=8C=E5=B1=95=E5=BC=80=EF=BC=8C=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E5=BC=80=E6=B5=8F=E8=A7=88=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/mockups/github-integration.html | 7 +++++-- docs/mockups/github-integration.md | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/mockups/github-integration.html b/docs/mockups/github-integration.html index ea6d78f..ae44f01 100644 --- a/docs/mockups/github-integration.html +++ b/docs/mockups/github-integration.html @@ -112,7 +112,9 @@ border-radius: 6px; background: rgba(255,255,255,0.035); font-size: 11px; } - body.t2 .pr, body.both .pr { display: flex; } + /* only the selected worktree expands its PR strip */ + body.t2 .wt.sel + .pr, body.both .wt.sel + .pr { display: flex; } + .pr .open-hint { margin-left: 4px; color: var(--fg-faint); font-size: 10px; flex-shrink: 0; } .pr .num { font-family: var(--mono); font-size: 10.5px; color: var(--fg-muted); } .pr .state { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; padding: 2px 6px; border-radius: 3px; } @@ -202,6 +204,7 @@

Mori · GitHub 集成 mockup

#91 redesign the sidebar — calmer… ✓ 12 +
@@ -314,7 +317,7 @@

Mori · GitHub 集成 mockup

Tier 1gh dash 作为 companion tool 跑在右侧面板,⌥G 唤起,复用 lazygit 那套架构 - Tier 2 — 每个 worktree 行下挂一条 PR 状态条:编号 / 状态 / CI checks,绑定当前 branch + Tier 2 — 仅选中 worktree 展开 PR 状态条:编号 / 状态 / CI checks,点击 ↗ 开浏览器