Repository navigation
Docs and Screenshots
This wiki lives in docs/wiki/ and a workflow publishes it to the GitHub wiki. Docs sit next to the code, so a change and its docs are reviewed together. This page explains the checks and screenshots, then gives recipes.
-
usage/has pages for people who use the app, like Merge Tool. No code, plain words, lots of screenshots. -
developer/has platform pages like this one, and one chapter per feature, like How the Merge Tool Works. -
images/holds the screenshots, as PNG files. -
features.jsonis the map: every usage page, every developer page, and every feature with its pages and screenshots. Its order is the sidebar order.
A feature entry looks like this:
{
"id": "merge-tool",
"title": "Merge tool",
"usage": "usage/Merge-Tool.md",
"developer": "developer/How-the-Merge-Tool-Works.md",
"screenshots": ["merge-tool.png", "merge-tool-resolved.png"]
}bun scripts/build-wiki.ts --checkCI runs this on every push and pull request, in the step "Wiki docs are complete" of ci.yml. It fails when:
- a listed page is missing, a page is not listed, two pages share a wiki name, or a feature id repeats;
- a feature's usage page is not listed under
usage, or it has no screenshots; - a screenshot is missing (the message prints the command that takes it), not shown on its usage page, or an image is unused. Until a shot is taken,
[TODO:my-shot.png]where it goes passes and is listed as still to take; - a link points to a missing file or to a page not in the manifest;
- a page does not start with a
# Titleline, contains the em-dash character, has more thanMAX_WORDS(1200) words of prose, or has amermaidblock that does not start with a diagram type.
Code blocks and diagrams do not count as words. The pure helpers are in scripts/wiki.ts, tested by scripts/wiki.test.ts. How pages become the wiki is in Releases and CI.
flowchart LR
Edit["edit docs/wiki<br/>with the code"] --> PR["pull request into develop"]
PR --> CI["CI: Wiki docs are complete"]
CI --> Dev["develop"]
Dev -->|"stable release"| Master["master"]
Master -->|"push touching the docs"| Wiki["wiki.yml: Publish to the wiki"]
Wiki --> Pages[("repo.wiki.git")]
Screenshots show the real app, since a mocked backend drifts: scripts/screenshots.ts drives a WebKit page (Playwright) that talks to a running bun tauri dev through the dev-only IPC bridge (Architecture). The bridge relays commands, Channel messages and a few backend events, so terminal and search shots show real output.
What the script does, and why:
-
It rebuilds the demo on every run in
/tmp/nibtree-docswithscripts/make-docs-demo.sh(history, a merge in progress, a submodule, Git LFS images, a plain folder). Dates are relative to today, so blame always reads "2 days ago". - It keeps your own setup out. The page answers some commands itself: settings, state and unsaved text live in memory, the launch mode points at the demo, folder pickers return a fixed answer. Dialog, opener and window calls never reach the app; GitHub gets canned releases.
- It refuses anything outside the demo. Any other command with an absolute path argument outside the demo folder fails with a "blocked" error, so a shot can never touch a real repository.
- It retries once, since a dev server reload can break one attempt.
You need, once, bunx --bun playwright install webkit.
- Start the app with the bridge on and leave it running:
GM_IPC_BRIDGE=1 bun tauri dev. Vite prints "IPC bridge on" when it works. Keep the app window visible, not minimized or behind a full-screen app: macOS pauses a hidden web view, and every shot then fails with "No app window answered". - In a second terminal, find the name:
bun scripts/screenshots.ts --list. Names are the image file names without.png. - Take it:
bun scripts/screenshots.ts merge-tool. You can pass several names, with or without.png. With no names, it retakes all of them. - Look at the new image before you commit: a script can say "done" for a picture of the wrong thing.
- In
scripts/screenshots.ts, add adefine("my-shot", async (shot) => { ... })next to similar ones. Use the helpers onshot, likeopenFile,activateRepo,showLog,clipAroundandsave. The optional third argument is a scenario: settings, state, color scheme, window size, releases and more. - If it needs new data, add it to
scripts/make-docs-demo.sh, with relative dates. - Add
my-shot.pngto the feature'sscreenshotsinfeatures.json. - Show it on the feature's usage page:
. - Take it (
bun scripts/screenshots.ts my-shot), look at it, and run the check.
- Add the feature to
featuresinfeatures.json. A new usage page also goes in theusagelist, with a one-line summary. - Write the usage page in
usage/: a# Titleline, plain words, every screenshot shown. - Write the chapter
developer/How-...-Works.md: why we need it, how it works (with mermaid diagrams), where the code lives, design decisions, tests, keeping it in sync, and an empty "Bugs we fixed" section. - Add its screenshots (recipe above).
- Add a line under
## [Unreleased]inCHANGELOG.md. - Run
bun scripts/build-wiki.ts --check.
- Look up the feature in
features.jsonto find its pages and screenshots. - Update the usage page. Check every label, setting and shortcut against the code.
- Update the developer chapter: how it works, where the code lives, the decisions.
- Retake the screenshots that show the change.
- For platform changes, update the matching page: builds in Developer Guide, CI and releases in Releases and CI, versions in Versioning and Changelog, tests in Testing, and commands in Commands and Events.
- Run the check.
Add an entry under "Bugs we fixed" in the feature's chapter. The next person to touch that code needs exactly this:
**Blame vanished after an undo.**
- **The issue:** what the user saw.
- **Why it happened:** the real cause, not the symptom.
- **The fix and why we chose it:** what changed, and why this fix over the others.Also add a test that fails without the fix, and a ### Fixed line in the changelog if users could see the bug.
rm -rf /tmp/wiki-preview
bun scripts/build-wiki.ts /tmp/wiki-previewIt checks first and writes nothing on a problem. You get the flat wiki: one Page-Name.md per page, images/, and the generated Home.md, _Sidebar.md and _Footer.md. Links between pages are wiki names without .md, so they only work on GitHub. The build does not empty the folder, which is why the first line clears it.
Running the Wiki workflow by hand publishes to the live wiki for everyone, so do not use it as a preview.
Shots opened the welcome screen and patched your state.json. The page relayed window_startup (the app window's folders, refused) and update_config to the app. It now answers both itself.
Mermaid shots timed out. The mermaid frame started the bridge too and failed; now only the top window does.
Terminal shots timed out. GPU drawing leaves xterm's text rows empty, so terminal scenarios turn terminalGpuAcceleration off; the DOM renderer looks the same.
- Simple, friendly English and short sentences. Explain the why, and explain git terms on first use.
- Aim for 300 to 1000 words. Split a big topic rather than grow a page.
- Relative links only, like
Architecture.mdor../usage/Getting-Started.md. - Diagrams in
mermaidblocks: flowchart, sequenceDiagram, stateDiagram-v2, classDiagram or gitGraph. Quote labels with punctuation. - Never the em-dash character. Use a colon, a comma or a hyphen.
- Never point the bridge at a real repository or at your own
~/.nibtree.
The pull request template repeats the docs checklist. See Contributing.
These pages are generated from docs/wiki. To correct something, open a pull request against the source file; edits made here are overwritten.
Using Nibtree
- Getting Started
- Welcome Screen
- Workspaces
- Files Panel
- File Operations
- File Icons
- Rounded Panels
- Editor and Tabs
- Pin Reorder and Wrap Tabs
- Single Tab Title
- Split Editor
- New File and Unsaved Changes
- Unload Hidden Tabs
- Editing Code
- Code Appearance
- Markdown Editor
- Image and PDF Preview
- Search Everywhere
- Recent Files
- Navigation Bar
- Find and Replace
- Changes and Commits
- Sign In Prompts
- Commit Box Layout
- Repository Actions
- Commit Options
- Ignoring Files
- Diffs
- Inline Diffs
- Staging View
- Revert a Change
- Resolving Conflicts
- Merge Tool
- Blame
- History and Log
- Merge Commits
- Branches and Tags
- Branches Popup
- Remotes
- Stashes
- Shelf
- Git Menu
- Git Dialogs
- Interactive Rebase
- Worktrees
- AI Agents
- AI Tasks
- AI Usage
- Keep Computer Awake
- Submodules
- Git LFS
- GitHub
- Git Console
- Terminal
- Terminal Features
- Scripts
- Navigation
- Menus
- Settings
- Settings Search
- Color Themes
- Settings Terminal and Automation
- Settings Files
- Updates
- Status Bar and Help
- Notifications
- Memory Use
- Clear Cache
- MCP and CLI
- Git Mergetool
- Keyboard Shortcuts
- Keyboard Shortcuts Editor
- Troubleshooting
- Troubleshooting Git
Developers
- Developer Guide
- Architecture
- Project Layout
- Backend
- How Folder Watching Works
- Folder Watching Bugs We Fixed
- How Workspace Files Work
- How the Preview Scheme Works
- Backend Services
- How Terminal Features Work
- Terminal Bugs We Fixed
- Frontend
- How the Rich Markdown Editor Works
- Rich Markdown Bugs We Fixed
- Git Menu Links
- Menu Keys and Routing
- Frontend Modules
- Blame Bugs We Fixed
- Project Color And Title Bar
- One Diff View
- Diff Bugs We Fixed
- Merge Tool Layouts
- Merge Tool Bugs We Fixed
- Color Theme Bugs We Fixed
- How the Connected Diff Works
- Rounded Panels Bugs We Fixed
- Update Bugs We Fixed
- Status Bar Bugs We Fixed
- MCP and CLI Bugs We Fixed
- Repository Actions Bugs We Fixed
- How the Changes Tab Works
- CodeMirror Patterns
- How the Cursor Works
- How Editor Features Work
- How the Path Bar Works
- Commands and Events
- Settings Reference
- Commands Workspace and Changes
- Commands Branches and Remotes
- Commands History and Extras
- Commands App and Tools
- Testing
- Test Suites
- Debugging
- Debugging with MCP
- Measuring Setting Memory
- How Terminal Memory Is Measured
- How Markdown Diagrams Work
- Releases and CI
- Publishing the Wiki
- Versioning and Changelog
- Browser Version Packages
- Browser Release Checks
- Docker Image
- Platforms and Signing
- Windows Support
- Windows Bugs We Fixed
- Windows MCP and CLI
- Docs and Screenshots
- UI Library
- UI Library MCP
- UI Library Bugs
- UI Library Migration
- Contributing
How features work
- Welcome screen
- Workspaces and folders
- Files panel
- File operations
- File icons
- Editor and tabs
- Pin, reorder and wrap tabs
- Single tab title
- Split editor
- New File and unsaved changes
- Unload hidden tabs
- Editing code
- Code appearance
- Markdown editor
- Image and PDF preview
- Search Everywhere
- Recent Files
- Navigation Bar
- Find and replace
- Changes and commits
- Sign-in prompts
- Commit box layout
- Repository actions
- Commit options
- Ignoring files
- Diffs
- Inline diffs
- Staging view
- Revert a change
- Resolving conflicts
- Merge tool
- Blame
- History and log
- Merge commits
- Commit tabs
- Branches and tags
- Branches popup
- Remotes
- Stashes
- Shelf
- Git menu
- Git dialogs
- Interactive rebase
- Worktrees
- AI agents
- AI usage
- Keep computer awake
- AI tasks
- Submodules
- Git LFS
- GitHub account
- Git Console
- Back and Forward
- Integrated terminal
- Scripts tool window
- Menu bar
- Settings
- Search in Settings
- Color themes
- Rounded panels
- Updates and release channels
- Status bar and help links
- Notifications
- Memory readout and memory log
- Clear Cache
- MCP server and command line tool
- git mergetool mode