Repository navigation
Debugging with MCP
Some problems only show in the real app: a color that hides a selection, memory that grows while you scroll, a panel that is drawn but empty. The Web Inspector helps (see Debugging), but an AI agent connected through the MCP server, or a script using nibtree cli, can look at the running window, measure it and repeat the same steps many times. This page shows how. How the server works is in How MCP and the CLI work.
- Start the app, the dev build (
bun tauri dev) or a release. - In Settings, Automation, turn on MCP server (for an agent) or Command line tool (for scripts).
- Connect Claude Code with the command under Connect Claude Code, or use
nibtree cli. - In Help > Available MCP Tools, check that the Performance tools are on (they are by default).
The dev build and a release share ~/.nibtree, so they share the token too. Run only one of them with the server on: both use the same port.
-
get_app_state: the workspace, active repository, tabs, panels, terminals, theme and any open dialog. Start here. -
take_screenshot: a PNG of the window, even when other windows cover it (macOS only; macOS asks for Screen Recording permission once). From a terminal:nibtree cli screenshot /tmp/gm.png. -
inspect_elements: elements by CSS selector, with their text, position, size, scroll position, visibility and the computed styles you ask for. -
inspect_layout: the window's size, the page's own scroll, every scrolled container, every element that reaches past the window and the focused element, each with a short CSS path. Use it when the UI moved, was cut off or left a gap. -
trace_scrolls: call it withaction=start, do the action, thenaction=stop. It returns every scroll and everyscrollIntoView,scrollTo,scrollBy,scrollTopandfocuscall with its target and the code that made it. A trace left running ends by itself after a minute.
nibtree cli call inspect_elements selector=".cm-editor .cm-activeLine" styles='["background-color","z-index"]'To reproduce a problem, drive the UI with run_menu_command (any menu item, see list_menu_commands), open_file, show_panel, show_commit and scroll_view.
nibtree cli call trace_scrolls action=start
nibtree cli call open_file filePath=/path/to/notes.md
nibtree cli call trace_scrolls action=stopOpening a Markdown file moved the whole app up under the title bar, and screenshots could not say why. trace_scrolls around open_file listed a scrollTop write to every ancestor of the Rich Editor, all from ProseMirror's restoreScrollStack. The fix is in Rich Markdown Bugs We Fixed.
A selection inside one line showed nothing. inspect_elements on .cm-selectionBackground showed the selection was drawn, with the right color, and on .cm-activeLine showed an opaque background on the same line, above it. CodeMirror draws the selection behind the text, so the current line highlight covered it. The fix is in How the editor works.
sequenceDiagram
participant A as Agent or script
participant S as Nibtree MCP server
A->>S: start_memory_recording (intervalMs 250)
A->>S: mark_memory_recording "fast scroll starts"
A->>S: scroll_view (target, speed, rounds)
S-->>A: duration, dropped frames
A->>S: read_memory_recording (sinceMs)
S-->>A: new samples, peak with its time
A->>S: stop_memory_recording
S-->>A: summary per process, marks
-
get_memory_usage: one reading, per process (app, Web content, Graphics, Networking). -
sample_memory: readings for up to 60 seconds in one call, with minimum, maximum and average. - The recorder (
start_memory_recording,mark_memory_recording,read_memory_recording,stop_memory_recording): runs in the background while you or the agent act. Marks label the moments, so a peak can be matched to an action. Ask the user to scroll by hand and read the recording afterwards. -
get_ui_performance: DOM element counts per area, open tabs, mounted editors, terminals, drawn Markdown diagrams, long tasks since the last call and frame timing. -
nibtree cli memory --interval 250 --duration 30: live lines in a terminal, then the minimum, average and peak.
For a problem the user meets by hand, turn on the memory log (Settings, Automation, Memory log). It writes every change with what was on screen and when scrolling started and stopped. Read it with read_memory_log or open ~/.nibtree/logs/memory.log. See How memory is measured.
Scrolling a 35 KB README fast made WebKit's Web content process peak at 400 to 650 MB, then settle at 60 to 200 MB. A plain HTML page without our code did the same, and the same setup gave 98 MB in one run and 444 MB in the next. So the peak is WebKit's, runs are noisy, and no change was made. Measure several runs and compare marks, not single numbers.
git_console_entries lists the git commands the app ran, with arguments, exit codes, timing and the start of their output. It is empty unless Settings, Git, Git Console is on (see Git Console). git_status, git_conflicts and git_log show the repository as the app sees it.
- Use demo repositories (
scripts/make-conflict-repo.sh,scripts/make-workspace-demo.sh) for anything that changes files; the tools only reach the open folders. - Keep destructive tools off unless the test needs them.
- Turn the server and the memory log off when you are done.
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