René's URL Explorer Experiment


Title: git-stats: a sidebar card for the working tree and the session's pull requests by navbytes · Pull Request #21 · navbytes/opencode-plugins · GitHub

Open Graph Title: git-stats: a sidebar card for the working tree and the session's pull requests by navbytes · Pull Request #21 · navbytes/opencode-plugins

X Title: git-stats: a sidebar card for the working tree and the session's pull requests by navbytes · Pull Request #21 · navbytes/opencode-plugins

Description: A second plugin in the monorepo: opencode-git-stats, a TUI-only sidebar card holding the whole folder's diff figures and a GitHub-coloured chip per pull request the session touched. Git Stats ⎇ add-git-stats-plugin +123 -45 · 7 files #21 Open × #20 Merged × Shape sidebar_content slot at order 450 — the host's own sections are 100 Context … 400 Todo, 500 Modified Files, drawn lowest first, so the worktree totals land directly above that file list. Everything else is opencode's own API: client.vcs.status(), state.vcs, state.session.messages() / state.part(), event.on(...), kv, keymap, lifecycle. The figures are client.vcs.status(), not state.session.diff(). Those are different things: despite the name, session.diff accumulates per-turn snapshot diffs for the files this session changed — which is the list the host already draws two lines below. "Diff stats in the folder" means the working tree. Chips are sighted incrementally, from completed tool parts via message.part.updated, with a count-guarded catch-up scan for whatever happened before the card mounted. Walking the transcript inside a createEffect instead would rescan every message on every streamed token. A chip exists only because a command actually printed the URL — the assistant's prose is not scanned. Pull requests the session created lead the ones it merely referenced. State comes from gh pr view --json state,isDraft, the one question opencode's API cannot answer, and the chip is painted with GitHub's own colours (#59636e draft, #1f883d open, #cf222e closed, #8250df merged) on white, the way the badge on the pull request page is. Merged is terminal and never re-fetched; failures back off exponentially to ~16 minutes and reset at a turn boundary in case gh was just installed or logged into. Dismissed chips are never fetched at all. Security Only github.com is trusted without configuration. The URLs are found in tool output, which can carry whatever a fetched page or a pasted file put there, and the host goes straight to gh --repo /… — which treats an unknown host as Enterprise and would send it a request with an Enterprise token attached. So github.evil.example and github.com.evil.example are ignored, and a real Enterprise host has to be named in the plugin's hosts option. gh is spawned with an argv array, never a shell string. At most 24 chips are tracked per session, so one gh pr list --json url cannot mint a process per pull request. Closing a chip Click the × (the host's own sidebar uses onMouseDown, so mouse works), or /prs to hide one, hide all, or bring the hidden ones back. Dismissals live in kv per session, unioned with an in-memory set for the window before kv is ready. Each chip label is an OSC 8 hyperlink to the pull request. Verified 79 unit tests, plus a real OpenCode TUI driven under a pty, asserting on composed screens and raw terminal bytes: card renders Git Stats / ⎇ main / +6 -1 · 3 files, and those figures match what git itself reported (+4/-1 across 2 tracked files, plus a 2-line untracked one) chip renders #20 Merged as \x1b[38;2;255;255;255m\x1b[48;2;130;80;223m — #8250df on white — and carries an OSC 8 link to the PR; on a non-truecolor terminal it degrades to 48;5;98 /prs opens "Pull request chips" with the PR title as the row description; selecting hides the chip, and a second /prs offers "Show 1 hidden chip again" and restores it with gh logged out the chip reads #20 … and the card says gh: run `gh auth login` rather than guessing a colour no errors, exceptions or tracebacks in any capture gh itself is covered against live GitHub and against a stubbed binary for every failure path (missing, logged out, deleted PR, unreadable JSON, killed/aborted). Also release.yml and publish.yml gain git-stats in the package choice list, and the root README gains its row. Per the repo's own note, the first version of a new package still has to be npm published by hand once before OIDC trusted publishing will attach.

Open Graph Description: A second plugin in the monorepo: opencode-git-stats, a TUI-only sidebar card holding the whole folder's diff figures and a GitHub-coloured chip per pull request the session touched. Git Stats ⎇...

X Description: A second plugin in the monorepo: opencode-git-stats, a TUI-only sidebar card holding the whole folder's diff figures and a GitHub-coloured chip per pull request the session touched. Git Sta...

Opengraph URL: https://github.com/navbytes/opencode-plugins/pull/21

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:f2e13c13-d5e4-ccf5-ab1b-1c34d1852bc7
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idC3F4:21AC3F:322829B:3F807CA:6B01B4D3
html-safe-nonce6cb213872a05fe6ff1173593e060a69794c01fab653796ffecf222f4bf39ae66
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDM0Y0OjIxQUMzRjozMjI4MjlCOjNGODA3Q0E6NkIwMUI0RDMiLCJ2aXNpdG9yX2lkIjoiNzAwNzMzNTA5OTA4MzYzMzg3NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacc694412eae61d05294081d1234f7b218f860ba72a0f3d447c2a25dbc8dbabd4b
hovercard-subject-tagpull_request:4491168381
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/navbytes/opencode-plugins/pull/21/files
twitter:imagehttps://avatars.githubusercontent.com/u/25281802?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/25281802?s=400&v=4
og:image:altA second plugin in the monorepo: opencode-git-stats, a TUI-only sidebar card holding the whole folder's diff figures and a GitHub-coloured chip per pull request the session touched. Git Stats ⎇...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/navbytes/opencode-plugins git https://github.com/navbytes/opencode-plugins.git
octolytics-dimension-user_id25281802
octolytics-dimension-user_loginnavbytes
octolytics-dimension-repository_id1354341697
octolytics-dimension-repository_nwonavbytes/opencode-plugins
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1354341697
octolytics-dimension-repository_network_root_nwonavbytes/opencode-plugins
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/navbytes/opencode-plugins/pull/21/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnavbytes%2Fopencode-plugins%2Fpull%2F21%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnavbytes%2Fopencode-plugins%2Fpull%2F21%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=navbytes%2Fopencode-plugins
Reloadhttps://github.com/navbytes/opencode-plugins/pull/21/files
Reloadhttps://github.com/navbytes/opencode-plugins/pull/21/files
Reloadhttps://github.com/navbytes/opencode-plugins/pull/21/files
navbyteshttps://github.com/navbytes
opencode-pluginshttps://github.com/navbytes/opencode-plugins
Codehttps://github.com/navbytes/opencode-plugins
Issueshttps://github.com/navbytes/opencode-plugins/issues
Pull requests1 (1)https://github.com/navbytes/opencode-plugins/pulls
Actionshttps://github.com/navbytes/opencode-plugins/actions
Projectshttps://github.com/navbytes/opencode-plugins/projects
Security and qualityhttps://github.com/navbytes/opencode-plugins/security
Insightshttps://github.com/navbytes/opencode-plugins/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fnavbytes%2Fopencode-plugins%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fnavbytes%2Fopencode-plugins%2Fissues%2Fnew%2Fchoose
navbyteshttps://github.com/navbytes
mainhttps://github.com/navbytes/opencode-plugins/tree/main
add-git-stats-pluginhttps://github.com/navbytes/opencode-plugins/tree/add-git-stats-plugin
Conversation 0 https://github.com/navbytes/opencode-plugins/pull/21
Commits 2 https://github.com/navbytes/opencode-plugins/pull/21/commits
Checks 1 https://github.com/navbytes/opencode-plugins/pull/21/checks
Files changed https://github.com/navbytes/opencode-plugins/pull/21/files
Please reload this pagehttps://github.com/navbytes/opencode-plugins/pull/21/files
git-stats: a sidebar card for the working tree and the session's pull requests https://github.com/navbytes/opencode-plugins/pull/21/files#top
Show all changes 2 commits https://github.com/navbytes/opencode-plugins/pull/21/files
df9aed0 git-stats: a sidebar card for the working tree and the session's pull… navbytes Sep 10, 2026 https://github.com/navbytes/opencode-plugins/pull/21/commits/df9aed063bf1afd8ff94176c3a2305c30a7887d0
60e5b2c git-stats README: badges, @latest, and an accurate account of detecti… navbytes Sep 10, 2026 https://github.com/navbytes/opencode-plugins/pull/21/commits/60e5b2c21f2cdb50db8e2520ac9b39f037c17260
Clear filters https://github.com/navbytes/opencode-plugins/pull/21/files
Please reload this pagehttps://github.com/navbytes/opencode-plugins/pull/21/files
Please reload this pagehttps://github.com/navbytes/opencode-plugins/pull/21/files
publish.yml https://github.com/navbytes/opencode-plugins/pull/21/files#diff-551d1fcf87f78cc3bc18a7b332a4dc5d8773a512062df881c5aba28a6f5c48d7
release.yml https://github.com/navbytes/opencode-plugins/pull/21/files#diff-87db21a973eed4fef5f32b267aa60fcee5cbdf03c67fafdc2a9b553bb0b15f34
README.md https://github.com/navbytes/opencode-plugins/pull/21/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
bun.lock https://github.com/navbytes/opencode-plugins/pull/21/files#diff-bfd0ef82a01108fa1e836c2500b98b7de8a92bb1ae352a8efcbd9d6ffcaabd60
CHANGELOG.md https://github.com/navbytes/opencode-plugins/pull/21/files#diff-c87ceb280f935d487fcd43d79da40976c5fdf119484d0b8c4a8f55ec91d2a3cc
LICENSE https://github.com/navbytes/opencode-plugins/pull/21/files#diff-cb8020edd2dd8805ed27edb409852d103c963921d835279cdf81386ad726c880
README.md https://github.com/navbytes/opencode-plugins/pull/21/files#diff-2b09845d4574d10fc9da390f7498ef0fd02e8009d1d45fee3ca4e07f4ba9d8e6
package.json https://github.com/navbytes/opencode-plugins/pull/21/files#diff-2a5b3659d7b48c8d99d161e154cf2f0cdd0c08ad1663633930a2ce8ce0e95af2
build.ts https://github.com/navbytes/opencode-plugins/pull/21/files#diff-f0e127a81c3bd69b5d87504b48bb974e2c9baf303dd7e23d335c23f164370972
gh.ts https://github.com/navbytes/opencode-plugins/pull/21/files#diff-f28a9346f192afa4a826308ddd608e2e9ea97a862d7878030567aa234cf35f7d
pr.ts https://github.com/navbytes/opencode-plugins/pull/21/files#diff-504f03a40092bf52031009dcc2dbd6461233b42400fee5ae6c3a4c774a1bb3a3
stats.ts https://github.com/navbytes/opencode-plugins/pull/21/files#diff-0e48c24a05e5ae5e66a54e8c8869ce5911dd3ad2d51b8cb9c390945d66c33848
tracker.ts https://github.com/navbytes/opencode-plugins/pull/21/files#diff-371c09ccdcb789f21299eaa41ed7a460bae39fb49160f8018a7941f1509f6ecd
card.tsx https://github.com/navbytes/opencode-plugins/pull/21/files#diff-ebd09823ee8cb1cf332d7c6d68eadf111b0dc0e3037c584824b09fccaf415f36
index.tsx https://github.com/navbytes/opencode-plugins/pull/21/files#diff-595714a66d010bf1cb5f577775285bd99b4ad5a7983a7da9ac438497bd5ad354
gh.test.ts https://github.com/navbytes/opencode-plugins/pull/21/files#diff-0ee4a11c7f71a44034a311415af224b303352285702e777d41d3d1c5d26da916
pr.test.ts https://github.com/navbytes/opencode-plugins/pull/21/files#diff-c0da7c598f99ab0dc3d5df9e53a50019783d5de1d1fb6ed3489e0d3a1561adbb
stats.test.ts https://github.com/navbytes/opencode-plugins/pull/21/files#diff-e5601e0884962fd12d54614260c99184fad5a74a84409eea3f204e7d24bbd13b
tracker.test.ts https://github.com/navbytes/opencode-plugins/pull/21/files#diff-c4e8c33da0db0abdc4c8d080e9e31b131292789fa78465849629ac4b5d1e8631
tsconfig.json https://github.com/navbytes/opencode-plugins/pull/21/files#diff-dde2e869d69efddeab6b24f268851944224f59c420221d9197a302975995f5c3
.github/workflows/publish.ymlhttps://github.com/navbytes/opencode-plugins/pull/21/files#diff-551d1fcf87f78cc3bc18a7b332a4dc5d8773a512062df881c5aba28a6f5c48d7
View file https://github.com/navbytes/opencode-plugins/blob/60e5b2c21f2cdb50db8e2520ac9b39f037c17260/.github/workflows/publish.yml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/navbytes/opencode-plugins/pull/21/{{ revealButtonHref }}
https://github.com/navbytes/opencode-plugins/pull/21/files#diff-551d1fcf87f78cc3bc18a7b332a4dc5d8773a512062df881c5aba28a6f5c48d7
https://github.com/navbytes/opencode-plugins/pull/21/files#diff-551d1fcf87f78cc3bc18a7b332a4dc5d8773a512062df881c5aba28a6f5c48d7
.github/workflows/release.ymlhttps://github.com/navbytes/opencode-plugins/pull/21/files#diff-87db21a973eed4fef5f32b267aa60fcee5cbdf03c67fafdc2a9b553bb0b15f34
View file https://github.com/navbytes/opencode-plugins/blob/60e5b2c21f2cdb50db8e2520ac9b39f037c17260/.github/workflows/release.yml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/navbytes/opencode-plugins/pull/21/{{ revealButtonHref }}
https://github.com/navbytes/opencode-plugins/pull/21/files#diff-87db21a973eed4fef5f32b267aa60fcee5cbdf03c67fafdc2a9b553bb0b15f34
https://github.com/navbytes/opencode-plugins/pull/21/files#diff-87db21a973eed4fef5f32b267aa60fcee5cbdf03c67fafdc2a9b553bb0b15f34
README.mdhttps://github.com/navbytes/opencode-plugins/pull/21/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
View file https://github.com/navbytes/opencode-plugins/blob/60e5b2c21f2cdb50db8e2520ac9b39f037c17260/README.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/navbytes/opencode-plugins/pull/21/{{ revealButtonHref }}
https://github.com/navbytes/opencode-plugins/pull/21/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
https://github.com/navbytes/opencode-plugins/pull/21/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
bun.lockhttps://github.com/navbytes/opencode-plugins/pull/21/files#diff-bfd0ef82a01108fa1e836c2500b98b7de8a92bb1ae352a8efcbd9d6ffcaabd60
View file https://github.com/navbytes/opencode-plugins/blob/60e5b2c21f2cdb50db8e2520ac9b39f037c17260/bun.lock
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/navbytes/opencode-plugins/pull/21/files
packages/git-stats/CHANGELOG.mdhttps://github.com/navbytes/opencode-plugins/pull/21/files#diff-c87ceb280f935d487fcd43d79da40976c5fdf119484d0b8c4a8f55ec91d2a3cc
View file https://github.com/navbytes/opencode-plugins/blob/60e5b2c21f2cdb50db8e2520ac9b39f037c17260/packages/git-stats/CHANGELOG.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/navbytes/opencode-plugins/pull/21/{{ revealButtonHref }}
packages/git-stats/LICENSEhttps://github.com/navbytes/opencode-plugins/pull/21/files#diff-cb8020edd2dd8805ed27edb409852d103c963921d835279cdf81386ad726c880
View file https://github.com/navbytes/opencode-plugins/blob/60e5b2c21f2cdb50db8e2520ac9b39f037c17260/packages/git-stats/LICENSE
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/navbytes/opencode-plugins/pull/21/{{ revealButtonHref }}
packages/git-stats/README.mdhttps://github.com/navbytes/opencode-plugins/pull/21/files#diff-2b09845d4574d10fc9da390f7498ef0fd02e8009d1d45fee3ca4e07f4ba9d8e6
View file https://github.com/navbytes/opencode-plugins/blob/60e5b2c21f2cdb50db8e2520ac9b39f037c17260/packages/git-stats/README.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/navbytes/opencode-plugins/pull/21/{{ revealButtonHref }}
packages/git-stats/package.jsonhttps://github.com/navbytes/opencode-plugins/pull/21/files#diff-2a5b3659d7b48c8d99d161e154cf2f0cdd0c08ad1663633930a2ce8ce0e95af2
View file https://github.com/navbytes/opencode-plugins/blob/60e5b2c21f2cdb50db8e2520ac9b39f037c17260/packages/git-stats/package.json
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/navbytes/opencode-plugins/pull/21/{{ revealButtonHref }}
packages/git-stats/scripts/build.tshttps://github.com/navbytes/opencode-plugins/pull/21/files#diff-f0e127a81c3bd69b5d87504b48bb974e2c9baf303dd7e23d335c23f164370972
View file https://github.com/navbytes/opencode-plugins/blob/60e5b2c21f2cdb50db8e2520ac9b39f037c17260/packages/git-stats/scripts/build.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/navbytes/opencode-plugins/pull/21/{{ revealButtonHref }}
Please reload this pagehttps://github.com/navbytes/opencode-plugins/pull/21/files
Please reload this pagehttps://github.com/navbytes/opencode-plugins/pull/21/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.