Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 43 additions & 17 deletions extensions/workdeck/README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,52 @@
# Workdeck

A work hub for [Muxy](https://muxy.app): a project-group sidebar, issue and deploy management, branch cleanup,
KakaoTalk-to-issue, and an agent control room — in one extension.
A work hub for [Muxy](https://muxy.app): a project-group sidebar, issue and deploy management (issues can be handed to
an agent that works in its own worktree), branch cleanup, notes, KakaoTalk-to-issue, and an agent control room — in one
extension.

Author: Wonjin · Languages: English, 한국어 (follows the system language; change it from the sidebar's `⋯` menu).

## What it does

**Sidebar** (replaces the built-in one; switch back any time from `⋯ → Sidebar`)
- Muxy workspaces become **groups**. Drag projects between groups, search, sort (manual, name, recent activity, date added).
- Folders you add are scanned for repositories and submodules, which are shown nested under the folder.
- Folders you add are scanned for repositories and submodules, which are shown nested under the folder. Repositories in
a git-ignored folder (SwiftPM `.build/checkouts`, vendored clones) are skipped. *Rescan repositories* in a project's
menu looks again and offers what is new.
- Home stays pinned on top. Hover a row for **+** (new tab there). Project menu: worktrees, color, icon, Finder, remove.
- **Agents** section with live status and the agent's icon, **Remote** section for SSH servers (one tab per connection),
resizable sections, and an icon-only compact mode when the sidebar is narrow.
- Open tab lists stay open when you move to another project, including the last active worktree's. Text cut off with
`…` shows in full when the pointer rests on it.
- **Agents** section with live status and the agent's icon (the agent in the focused terminal is highlighted),
**Remote** section for SSH servers (one tab per connection), resizable sections, and an icon-only compact mode when
the sidebar is narrow.

**Per-project tools** (right-click a project → *Manage*)
- **New issue…** — a modal to write an issue for **GitHub or Linear**: markdown editor with preview, templates,
labels, assignee, Linear team / project / status / priority. Or build the issue **from a KakaoTalk conversation**
(see below).
- **Issues** — GitHub and Linear side by side. Linear sub-issues are shown as groups. Change Linear status with one
click, link a Linear project (auto-matched by repository name, or searchable picker), comment, close or reopen.
- **Deploys** — PR review (checks, files, full diff, reviews, merge) and Actions progress with *which branch merges into
which branch*, job and step detail, re-run / cancel, workflows and releases.
(see below). After an issue is created, *New issue* starts the next one in the same window.
- **Issues** — GitHub and Linear side by side (the one you looked at last opens first). Linear sub-issues are shown as
groups. Change Linear status with one click, link a Linear project (auto-matched by repository name, or searchable
picker), comment, close or reopen.
- **Deploys** — PR review (checks, files, full diff, reviews and comments newest first, merge) and Actions progress with
*which branch merges into which branch*, job and step detail, re-run / cancel, workflows and releases.
- **Branch cleanup** — finds local and remote branches already merged into `main` / `master` / `develop` (including
squash-merged ones, matched through merged PRs) and deletes the ones you tick. Protected branches, the current branch
and branches checked out in a worktree are never offered; each delete re-checks the branch tip first.
- **Hand any issue or PR to an AI agent** with one click: pick Claude Code, Codex, OpenCode, Cursor Agent, Copilot CLI,
Gemini CLI, XITA or your own agent (add / edit / delete them in *Manage agents*).
- **Hand any issue or PR to an AI agent**: Claude Code, Codex, OpenCode, Cursor Agent, Copilot CLI, Gemini CLI, XITA or
your own agent (add / edit / delete them in *Manage agents*, where you also set the default agent and a default model
and effort per agent).
- **Running an issue with an agent** asks for the agent, model and effort, then:
- creates a git worktree and branch for the issue under `~/.local/share/workdeck/worktrees/<repo>-<id>/<branch>`
(Linear's branch name when it has one), starting from origin's default branch after a `git fetch` (or from the
remote branch if it already exists there). A branch that already has a worktree, from an earlier run, is reused;
- copies the main checkout's git-ignored `.env` / `.env.*` files into that worktree, so the project runs there without
touching your checkout (a checkbox in the dialog, on by default; the files are only copied, never read or sent);
- starts the agent in that worktree with the issue and the *issue instructions* (English, editable in *Manage agents*):
analyze and report first, agree on a direction with you, then implement, verify, commit locally, comment progress on
the issue, and move it to review (Linear review status, or a review label on GitHub). The instructions tell it not to
push, merge or close the issue unless you ask;
- marks the issue (and the sub-issues of a group) as running until the agent's terminal tab is closed, so it cannot
be started twice.

**Notes** (right-click a workspace or project → *Notes…*, or the top-bar note button / `ctrl+shift+n` for a quick memo)
- Notes have a scope: global, a workspace, or a project. Each note is a plain Markdown file under
Expand Down Expand Up @@ -58,20 +78,26 @@ error box has a button that opens the right System Settings page.

Muxy asks for approval the first time the extension runs a command (`gh`, `git`, `muxy`, `kakao-linear`, …).

Files the extension writes outside your projects: notes under `~/.workdeck/notes` (configurable); the prompt and the
model / effort choice handed to an agent, and the writing helper's session id and heartbeat, under
`~/.local/share/workdeck/run` (private to your account); issue worktrees under `~/.local/share/workdeck/worktrees`.
Remove a worktree you no longer need with `git worktree remove <folder>`.

## Why each permission is needed

| Permission | Used for |
| --- | --- |
| `projects:read` / `projects:write` / `projects:delete` | list projects and workspaces, move projects between groups, rename / reorder / remove them |
| `worktrees:read` / `worktrees:write` | show and switch worktrees |
| `worktrees:read` / `worktrees:write` | show and switch worktrees, let Muxy pick up an issue worktree right after it is created |
| `git:read` | current branch per project |
| `tabs:read` / `tabs:write` | list and open tabs, move manager tabs into the right project, close / rename / pin tabs |
| `agents:read` / `agents:write` | agent status in the sidebar and control room, jump to an agent's pane |
| `commands:exec` | run `gh`, `git`, `muxy`, `kakao-linear` and the Linear API call |
| `agents:read` | agent status in the sidebar and control room |
| `panes:read` | which terminal is focused (highlights its agent), whether an issue's agent tab is still open, and the session id printed in a XITA status line — that is how a row is matched to its terminal |
| `panes:write` | end an agent's terminal from the row's menu, after a confirmation, to clean up leftover sessions |
| `commands:exec` | run `gh`, `git` (including `git worktree add` for issue runs), `muxy`, `kakao-linear` and the Linear API call |
| `commands:read` / `commands:run` | start Muxy's *Open Project…* and *New Worktree* commands |
| `ui:write` | open Settings from the sidebar footer and remote menu |
| `panels:write` | the *New issue* modal and the sidebar-switcher popover |
| `preferences:read` | follow theme and preference changes |
| `storage:read` / `storage:write` | remember collapsed groups, section sizes, agents, Linear project matches, last choices |
| `clipboard:write` | *Copy path* |
| `system:open` | open links, reveal in Finder, open a project in another app |
Expand All @@ -90,7 +116,7 @@ real pages by the demo harness in [`demo/`](demo/) — see [`demo/README.md`](de

```
sidebar/ the sidebar page (core, add, view, main)
tab/ issues, deploys, branch cleanup and agent-control-room tabs, shared lib and agent launcher
tab/ issues, deploys, branch cleanup and agent-control-room tabs, shared lib, agent launcher, issue runs
modal/ the New issue modal (GitHub / Linear / KakaoTalk)
notes/ notes: storage (store.js), the notes tab and the quick-note modal
switcher/ the top-bar popover that switches the active sidebar
Expand Down
Binary file modified extensions/workdeck/assets/screenshots/03-pr-review.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions extensions/workdeck/demo/muxy-stub.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,42 @@ diff --git a/src/checkout/money.ts b/src/checkout/money.ts
return { exitCode: 0, stdout: "", stderr: "" };
};

/* ---- notes: files under the notes folder, answered for the fixed shell commands in notes/store.js ---- */
const nh = (meta) => `<!-- workdeck-note ${JSON.stringify({ v: 1, ...meta })} -->`;
const notes = {
"proj-acme-web/20261117-checkout-redesign-n1a2b3.md": { mtime: 1795017900, text: [
nh({ id: "n1a2b3", scope: "proj:web", scopeName: "acme-web", created: "2026-11-17 10:05" }), "# Checkout redesign", "",
"## 2026-11-17 10:12 · m1", "Payment step: keep saved cards above the new-card form. Ask design about the empty state when there are no saved cards.", "",
"## 2026-11-17 14:40 · m2", "Why do totals sometimes differ by one cent from the API?",
`<!-- thread ${JSON.stringify({ agent: "Claude Code", state: "done", summary: "- The cart rounds each line, the API rounds the sum after tax\n- Fix: round once, after tax, in `cart/totals.ts`\n- Add a test with 3 × 0.335 and a 10% coupon\n- Ask the API team whether invoices use the same rule", msgs: [{ x: "why do cart totals differ by a cent?" }, { x: "where would you fix it?" }] })} -->`, "",
"## 2026-11-18 09:30 · m3", "Rounding fix filed as an issue; pairing with Mina on the test cases.",
`<!-- issue ${JSON.stringify({ label: "ACM-143", url: "https://linear.app/acme/issue/ACM-143" })} -->`, "",
"## 2026-11-18 16:05 · m4", "Release notes: mention the new address autocomplete and the faster card form.", "",
].join("\n") },
"ws-acme-platform/20261118-platform-sync-n4d5e6.md": { mtime: 1794994800, text: [
nh({ id: "n4d5e6", scope: "ws:ws1", scopeName: "Acme Platform", created: "2026-11-18 11:00" }), "# Platform sync — Nov 18", "",
"## 2026-11-18 11:02 · m5", "Webhook retries: back off up to 1 h, then alert the on-call channel.", "",
"## 2026-11-18 11:20 · m6", "Staging database upgrade moves to Thursday night.", "",
].join("\n") },
"global/quick.md": { mtime: 1794928300, text: [
nh({ id: "n7f8g9", scope: "global", scopeName: "", created: "2026-11-16 08:40" }), "# Quick notes", "",
"## 2026-11-16 08:41 · m7", "Renew the code-signing certificate before Dec 3.", "",
"## 2026-11-17 18:12 · m8", "Try the new terminal font at 13 px.", "",
].join("\n") },
"proj-acme-api/20261115-webhook-retries-n0h1i2.md": { mtime: 1794841500, text: [
nh({ id: "n0h1i2", scope: "proj:api", scopeName: "acme-api", created: "2026-11-15 15:00" }), "# Webhook retries", "",
"## 2026-11-15 15:04 · m9", "Retries pile up when the partner endpoint is down; dedupe by event id.", "",
"## 2026-11-15 15:25 · m10", "Check how long the partner keeps failed deliveries before giving up.", "",
].join("\n") },
};
const notesShell = (sh, env) => {
const f = env.NOTES_FILE || "";
if (sh.includes("-maxdepth 3")) return Object.entries(notes).map(([file, n]) => `${file}\t${n.mtime}\t${(n.text.match(/^## \d/gm) || []).length}\t${n.text.slice(0, 700).replace(/\n/g, "\x01")}`).join("\n") + "\n";
if (sh.includes('echo "$R/$NOTES_FILE"')) return `${H}/.workdeck/notes/${f}\n`;
if (sh.endsWith('cat "$R/$NOTES_FILE"')) return notes[f] ? notes[f].text : null;
return "";
};

const base = (p) => String(p).replace(/\/+$/, "").split("/").pop();
const exec = async (arg, opts = {}) => {
if (Array.isArray(arg)) {
Expand All @@ -272,6 +308,7 @@ diff --git a/src/checkout/money.ts b/src/checkout/money.ts
}
const sh = arg.shell || "";
opts = { ...arg, ...opts }; // object form: { shell, stdin, timeoutMs }
if (opts.env && "NOTES_ROOT" in opts.env) { const out = notesShell(sh, opts.env); return out == null ? { exitCode: 1, stdout: "", stderr: "no such note" } : { exitCode: 0, stdout: out, stderr: "" }; }
if (sh.includes("desktop-state.json")) return { exitCode: 0, stdout: JSON.stringify(members) + "\n" + H + "\n", stderr: "" };
if (sh.includes("api.linear.app")) { const body = JSON.parse(opts.stdin || "{}"); return { exitCode: 0, stdout: JSON.stringify({ data: linearHandler(body.query, body.variables || {}) }), stderr: "" }; }
if (sh.includes("##CUR")) return { exitCode: 0, stdout: cleanupScan(), stderr: "" };
Expand Down
8 changes: 8 additions & 0 deletions extensions/workdeck/demo/scenario.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@
const click = (el) => el && el.click();
const SCENARIOS = {
async "issues-gh"() { await wait(900); click($$(".item")[0]); await wait(600); },
async "issues-agent"() {
await SCENARIOS["issues-gh"](); await wait(500);
click(byText(".agentbox.issue .btn.primary", "Run with an agent")); await wait(700);
const sel = document.querySelector(".runask select"); if (sel) { sel.value = "claude"; sel.dispatchEvent(new Event("change")); }
const [model, effort] = $$(".runask input[type=text]"); if (model) model.value = "opus"; if (effort) effort.value = "high";
const extra = document.querySelector(".runask textarea"); if (extra) extra.value = "Keep the old endpoint working until the mobile app ships 4.2.";
const keep = $$(".runask input[type=checkbox]").pop(); if (keep) keep.checked = true; // "save as default"
},
async "issues-linear"() {
await wait(500); click(byText("#source button", "Linear")); await wait(1400);
click($$(".item.group")[0]); await wait(900);
Expand Down
4 changes: 3 additions & 1 deletion extensions/workdeck/demo/shoot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ OUT="$ROOT/assets/screenshots"
CHROME="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
PORT=8765
mkdir -p "$OUT"
python3 -m http.server "$PORT" --directory "$ROOT" >/dev/null 2>&1 &
python3 -m http.server "$PORT" --bind 127.0.0.1 --directory "$ROOT" >/dev/null 2>&1 &
SERVER=$!
trap 'kill $SERVER 2>/dev/null' EXIT
sleep 1
Expand Down Expand Up @@ -37,4 +37,6 @@ shot 05-branch-cleanup "right=tab/cleanup.html&tabs=npm%20run%20dev,Checkout%2
shot 06-agent-board "right=tab/board.html&rscenario=board-alert&tabs=npm%20run%20dev,Checkout%20flow,Agent%20control%20room"
shot 07-new-issue-linear "right=tab/board.html&modal=modal/create.html&mscenario=modal-linear&tabs=npm%20run%20dev,Checkout%20flow,Agent%20control%20room" 150000
shot 08-chat-to-issue "right=tab/board.html&modal=modal/create.html&mscenario=modal-chat&tabs=npm%20run%20dev,Checkout%20flow,Agent%20control%20room" 150000
shot 11-issue-agent "right=tab/issues.html&rscenario=issues-agent&tabs=npm%20run%20dev,Checkout%20flow,Issues"
shot 10-notes "right=notes/notes.html&tabs=npm%20run%20dev,Checkout%20flow,Notes"
shot 09-chat-draft "right=tab/board.html&modal=modal/create.html&mscenario=modal-draft&tabs=npm%20run%20dev,Checkout%20flow,Agent%20control%20room" 150000
Loading
Loading