Skip to content

Windows: a GitHub panel, with news of broken builds, checks, review requests and merged pull requests - #57

Open
Edurique wants to merge 13 commits into
Louis-CFM:mainfrom
Edurique:windows-github
Open

Edurique wants to merge 13 commits into
Louis-CFM:mainfrom
Edurique:windows-github

Conversation

@Edurique

@Edurique Edurique commented Oct 1, 2026 •

Copy link
Copy Markdown

The GitHub card, then the panel: activity, projects, a build running job by job, a pull request

What

Turns the Windows GitHub pill into something you can read your GitHub from, without leaving for the browser: a richer card in the overview, a full panel behind it, and Mochi speaking up when a build of yours breaks, the checks of a pull request of yours end, somebody asks for your review, a pull request of yours is merged, or somebody opens a pull request on one of your projects. Read-only from end to end.

It is a big diff (about 10 000 lines, almost all in new files) and I know that is a lot to ask of a review. It is one topic, and I could not find a split that would show as separate diffs from a fork — but if you would rather have it in pieces (panel first, then news, then comments), say so and I will cut it.

Windows only. Nothing under NotchBuddy/ is touched. The aim is to port it to Swift afterwards if you like where it goes.

What it looks like

The card — the year's contributions, the last seven days, the latest activity.

The panel, on Activity: the contribution graph and the latest events. Clicking a day shows what was done that day, and Mochi takes that day's colour.

Projects, and a project's sheet.

A pull request, and its checks while they run — one mini Mochi per job, followed live.

A run, job by job.

Comments on a pull request, and a thread shown on the line of the diff it is about.

News: a merged pull request, a broken build — and, added since this was opened, a pull request somebody else opens on one of your projects (same card, saying who opened it; no screenshot of it yet). Each project of the Projects tab has a bell: a click mutes its news, another gives it back. Open goes to it; OK folds the island and leaves the news on the pill for five minutes.

Review requests (added since this was opened, after the GitHub pulse landed on the Mac in #181): the pull requests your review is asked on stay at the top of the Activity tab, and a new request is news, told once.

Checks of your pull requests (added since, the other half of the Mac's pulse alerts): when the checks of one of your open pull requests end, red or green, it is news — on any project, not only the ones the panel lists. Same card as a merge; no screenshot of it yet.

Settings: switching GitHub on opens its setup under its line — the token, the permissions to grant, and a connection test that names the one that is missing.

All of these are the real island running on made-up data (dev/github-preview.html, see below), not mock-ups.

How to read it

Eleven commits, each of which builds:

Commit What Where
1 Keep the island on a whole pixel while it resizes same commit as #55
2 Nothing in the views moves while folded or hidden same commit as #56
3 Read GitHub from the Rust side src-tauri/src/github.rs, github_detail.rs
4 The panel, its card and its news src/views/github.ts, code.ts, palette.ts, style.css, and the wiring in island/, core/
5 GitHub's setup in the settings src/settings/
6 A preview page dev/github-preview.*
7 README and screenshots windows/README.md, windows/screenshots/
8 News of a pull request somebody opened on one of your projects src-tauri/src/github.rs, one line in views.ts and bridge.ts
9 A bell on each project, to choose which ones speak up github.rs, settings.rs, src/views/github.ts
10 The pull requests waiting for your review, and news of a new request github.rs, a section in src/views/github.ts
11 News when the checks of one of your pull requests end github.rs

The first two are #55 and #56: the panel needs both (its scrolling lists are where the blur showed, and it adds endless animations). If you merge those first, they drop out of this diff.

How to try it

Without a token:

cd windows
npm install
npm run dev

then open http://127.0.0.1:1420/dev/github-preview.html — the links at the bottom go to each screen.

With a token: npm run tauri dev, Settings… → Integrations → GitHub, create a fine-grained token as described there, Test connection.

The rules of the house

  • No new dependency: Cargo.toml, Cargo.lock, package.json and package-lock.json are unchanged.
  • Settings: one new field, githubMuted (the projects kept quiet), defaulted when absent so an older settings.json still loads.
  • Secrets: the token lives in the Windows Credential Manager through the existing secret_* commands. It is never written to disk or to the log, and never sent to the front — every request to GitHub is made by the Rust side, the front only asks whether a token exists.
  • Read-only: a fine-grained token with Actions, Contents, Deployments, Issues and Pull requests on Read-only (Events is optional, for private activity). Coucou never writes to GitHub. A part the token cannot read says which permission it lacks.
  • No telemetry, network only to what the user configured: api.github.com, and only once a token is saved and GitHub is switched on.
  • 0 % CPU when hidden: with the island hidden, all of Coucou's processes used 94 ms of CPU over 60 s on a 20-core machine (dev build), a GitHub refresh included. See Windows: nothing in the views moves while the island is folded or hidden #56.
  • Build: tsc --noEmit, vite build, cargo check pass; cargo test 61 passed (53 of them new, on the parsing and on what counts as news); cargo clippy shows nothing new.
  • Docs: a GitHub section in windows/README.md. I left CHANGELOG.md to you.

Things you should know before merging

  • The card is not the one in main. It replaces the GitHub card's content (figure, week, activity lines). It is the part most likely to be a matter of taste.
  • Next to the Mac's pulse (GitHub pulse: open PRs, CI status and reviews in the notch #181, GitHub pill: catch fast CI runs, refresh on open #185): this panel reads GitHub through its own code and was written before the pulse. Review requests are the part of the pulse it lacked; a build that finishes between two looks was already caught, since a run is told apart by its id. The Mac's news of a pull request's checks turning red or green is here too since commit 11, with the pulse's own rule for a commit whose checks start and end between two looks.
  • GitHub is asked more often: every 2 minutes instead of 5, and every 20 seconds for builds alone while one of them is running. Requests carry ETags, so unchanged answers do not count against the rate limit, and nothing is asked while Coucou is paused or GitHub is off.
  • island.ts and views.ts gained three things a view can ask of Mochi through ViewActions: a tint (tintMochi), a state (look), and going to the news at hand (followNews). A click on Mochi goes to the news when there is some, and is the usual slap otherwise.
  • The GitHub poller left integrations.rs for github.rs; the other pollers are untouched.

What I did not check

  • Display scales other than 100 %.
  • The news of a broken build and of a merged pull request were tested through the real event path with made-up events, and the detection is covered by unit tests, but I have not yet seen either fire from a real build or a real merge. The news of a pull request somebody opened is covered by a unit test and its query runs against the real API, but I have not yet seen it fire from a real pull request either. Muting a project is covered by a unit test for builds; I have not waited for real news on a muted project to see it stay quiet.
  • Review requests: the query runs against the real API with my fine-grained token and answers without an error, but nobody is asking for my review right now, so the list and the news were only seen on the preview's data (?review, ?news=review&view=pill) and through the unit test. I have not checked what a classic token sees.
  • Checks of your pull requests: the query answers without an error, but with my fine-grained token GitHub gives no roll-up for any of my 8 open pull requests (the log says 0 of 8 open pulls with checks) — the token has no Commit statuses permission, which the README now lists as optional. So this news is covered by a unit test only; I have not seen it fire.
  • Every query was run against the real API on my own account; jumping from a review thread to its line in the diff was only exercised on the preview's data.

The island was centred with translateX(-50%). While its width was animating, that put it on a fraction of a pixel, and anything painted during the animation in a compositing layer of its own — a scrolling list — kept that fraction once the island had settled: its text stayed blurry until something made it paint again. The offset is now rounded to a device pixel.
Folded or hidden, the views stay in the page with their opacity at 0, and their endless CSS animations (shimmer, typing, dash-march, pulse) went on being computed for nobody. They are paused while the island is not expanded and pick up when it unfolds.
The GitHub poller becomes a module of its own. With a read-only fine-grained token from the Credential Manager, it reads the year's contributions, the latest activity, the projects and their builds every two minutes — every twenty seconds for the builds alone while one is running — and, on demand, the sheet behind a project, a pull request, an issue, a push, a release, a run or a pull request's comments.

Requests go out one at a time through one client, with ETags so unchanged answers cost nothing, and the rate limit is kept track of. A part the token cannot read is reported by the name of the permission it lacks. The token never leaves this side: the front only ever asks whether it exists.

It also tells the island about two things as they happen: a build of yours that breaks, and a pull request of yours that is merged.
The GitHub card in the overview shows the year's contributions, the last seven days and the latest activity. Its figure opens a panel as tall as the window allows, with two tabs — Activity (the contribution graph, a day's work on a click, the latest events) and Projects — and a sheet behind every line: a project, a pull request with its checks and its files, an issue, a push, a release, a run with one mini Mochi per job, followed live, a pull request's comments, and a file's diff, syntax-coloured, opened on the line a thread is about. The trail on the left is the way back.

A broken build or a merged pull request opens the island on a card with Open and OK. OK folds the island and leaves the news on the pill for five minutes; a click on Mochi or on the card goes to it.

Mochi takes the colour of the day under the mouse and the state of the run on show; both are the view's to ask through ViewActions.
Switching GitHub on in Integrations opens its setup under its line: the token, the permissions to grant, and a connection test that checks each of them and names the one that is missing. An integration that needs more than its fields can declare a `setup` the same way.
dev/github-preview.html runs the real island on made-up GitHub data in a plain browser, so the card and the panel can be worked on without a token or the Rust side. Like upload-preview, it never ships in the app.
@Edurique
Edurique marked this pull request as ready for review October 1, 2026 11:57
FabioLukas123 added a commit to FabioLukas123/coucou that referenced this pull request Oct 1, 2026
…e GitHub panel

Brings in upstream's draft pull requests Louis-CFM#57 (GitHub panel, read from the
Rust side) and Louis-CFM#71 (follow Claude Code sessions from the island: each step,
each edit's diff, the turn's last message, questions and permissions
answered there), and fits them to the Linux port:

- Claude Code uses the new session model; Codex and OpenCode go through the
  external-agent path into their own pills (which keep their usage cards
  when a session ends), with a card of their last steps while they work.
- Clicking a session on Linux still brings its terminal forward: sessions
  and agent pills carry the process chain the hook sends.
- Answers given on one display's island (permission or question) clear
  the card on the others; secrets-changed reaches every island.
- GitHub keeps the gh CLI login fallback; open_claude_app uses xdg-open.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ne of your projects

The pill spoke up for two things: a build of yours that broke, and a pull request of yours that was merged. A pull request opened by somebody else on a project you work on went by unannounced, when it is the one that asks something of you.

The profile query now brings back the newest open pull requests of each project the Projects tab lists, at no extra request. One opened since the last look by anybody but you is news: a card that says who opened it, where and how big, and Open goes to it. As with merges, the first refresh only learns how things stand, and a broken build or a merge of yours is told first when several things happened at once.

The card's line ("pull request opened") now comes with the news instead of being guessed from good or bad.
News came from every project the Projects tab lists, with no way to keep one quiet: a busy repository you only follow drowns the ones you care about.

Each project of the tab has a bell. A click mutes it — no broken build, merge or opened pull request is told for it — and another gives it its voice back. The choice is kept in the settings (githubMuted, the projects that are quiet, so a new project speaks up by default), and the Rust side reads it before telling any news. What happens on a muted project is still learnt as it happens: unmuting it later does not replay it.
…thers

The time column of a row was sized for "19m": a project pushed less than a minute ago says "just now", which is wider, and its build badge and counts sat a few pixels left of every other row's. The column is as wide as the longest thing it says.
The panel said what you did and what happened to your projects, not what is
waiting on you. The pull requests your review is requested on now sit at the
top of the Activity tab, each opening its sheet, and a new request is news like
a merge is: a sound and a card, once, with Open going straight to it.

They come with the profile, in the same GraphQL request, so the tick costs no
more than before. GitHub does not say when a review was asked, so a request is
new when it was not among those waiting at the last look; the first refresh
only learns how things stand. A muted project stays silent here too.
@Edurique Edurique changed the title Windows: a GitHub panel, with news of broken builds and merged pull requests Windows: a GitHub panel, with news of broken builds, review requests and merged pull requests Oct 3, 2026
A build that breaks was news only on the projects the panel lists; a pull
request sent to somebody else's project could go red, or green, unseen. Your
open pull requests now come with the roll-up of their last commit's checks, in
the same request as the profile, and the end of those checks is news: red once
it was not red, green once it was pending. Checks that start and end between
two looks are caught by the commit having changed.
@Edurique Edurique changed the title Windows: a GitHub panel, with news of broken builds, review requests and merged pull requests Windows: a GitHub panel, with news of broken builds, checks, review requests and merged pull requests Oct 5, 2026

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant