Skip to content

perf: reduce workspace overhead and complete feature docs - #350

Merged
wzz6423 merged 3 commits into
mainfrom
perf/workspace-efficiency-docs
Dec 5, 2026
Merged

wzz6423 merged 3 commits into
mainfrom
perf/workspace-efficiency-docs

Conversation

@wzz6423

@wzz6423 wzz6423 commented Dec 5, 2026

Copy link
Copy Markdown
Owner

Summary

Switching repositories or starting Git operations previously discarded stale refresh results while their workers and timers kept running. Terminal cache hits also rebuilt row data, and each visible directory scanned all changed paths for its status.

  • Cancel obsolete Git refresh workers and watchdogs through one lifecycle path, including synchronous Git processes, snapshot loops, and model teardown.
  • Build a shared directory-status index per snapshot, preserve ignored-path precedence and Unicode path boundaries, and compare cached terminal cluster bytes without allocating a new row on cache hits.
  • Complete feature documentation across 17 languages, including session preservation and reopening, external editors, settings navigation, terminal tools, and Agent interfaces. Correct the homepage command-history entry point and keep shared restoration details on the project guide.
  • Add focused regression fixtures and English/Chinese contributor instructions for reproducing the performance checks.

@coderabbitai summary

GitHub Project

  • Project: zshell Development
  • Start date: 2026-12-04
  • Target date: 2026-12-05

PR Type

  • Type: perf

Validation

  • Status: passed

  • Command: xcodebuild -quiet -project mac/zshell.xcodeproj -scheme zshell -configuration Debug -destination 'platform=macOS,arch=arm64' -derivedDataPath mac/build/debug ENABLE_USER_SCRIPT_SANDBOXING=NO build

  • Result: The signed Debug app builds successfully. Launching it with isolated preferences publishes an authenticated session-controller connection, and zshell +session projects --connection <fixture-connection> returns its documented JSON array. The test instance and its private state are removed.

  • Status: passed

  • Command: codesign --verify --deep --strict --verbose=1 'mac/build/debug/Build/Products/Debug/zshell Debug.app'

  • Result: Bundle integrity and its designated requirement both pass.

  • Status: passed

  • Command: python3 -B mac/tests/test_git_refresh_lifecycle.py && python3 -B mac/tests/test_git_command_runner.py && python3 -B mac/tests/test_git_status.py && python3 -B mac/tests/test_git_status_snapshot.py && python3 -B mac/tests/test_terminal_text_shaper.py --benchmark

  • Result: Repository switches, mutations, completion and teardown cancel the owned workers/timers; synchronous and asynchronous cancellation clean up Git processes without growing thread or descriptor counts. Directory results match the full-scan reference, including Unicode separators; all 19 snapshot tests pass. Cached glyphs match fresh CoreText output across content, style, font, grid and invalid-buffer changes. In the local directory fixture, 1,600 lookups over 10,005 paths take 3.25 ms versus 230.73 ms for scanning, plus 3.27 ms to build the index. These timings measure a local hot path.

  • Status: passed

  • Command: python3 -B mac/tests/test_terminal_cell_width.py --derived-data mac/build/debug --font-features && python3 -B mac/tests/test_git_history_surfaces.py --built-app 'mac/build/debug/Build/Products/Debug/zshell Debug.app' && python3 -B mac/tests/test_file_tree_background.py --built-app 'mac/build/debug/Build/Products/Debug/zshell Debug.app'

  • Result: The earlier production-surface checks in this task pass for Ghostty (64 checks), Alacritty (69 checks), Git history (719 checks), and exclusive file creation using the built Debug module.

  • Status: passed

  • Command: cd web && bun install --frozen-lockfile && bun run build && bun run typecheck && bun test

  • Result: Build and type checking pass; all 51 tests pass. An additional HTML check resolves 13,814 documentation links and anchors across the generated site without errors. Browser checks of the Chinese, Arabic and English project guide retain the new section anchor during locale changes and report no console errors. The build runs first to generate the ignored TanStack route tree.

  • Status: passed

  • Command: make format && git diff --check && bash .github/scripts/check-repository-hygiene.sh

  • Result: Formatting, whitespace and repository hygiene checks pass.

  • Status: not run

  • Reason: Whole-application CPU/memory soak measurements and live SSH cancellation acceptance were not run. The remote lifecycle fixture uses a bounded transport double.

Risk and Rollback

  • Risk: Cancellation timing, status aggregation and glyph-cache equivalence affect frequently used paths. Regression fixtures cover stale results, process cleanup, status precedence, Unicode paths and cached output. The directory index adds per-snapshot storage proportional to changed-path ancestors. Whole-application CPU or memory reductions have not been measured.
  • Rollback: Revert this pull request. There are no settings migrations or version changes.

Related Issue

None

AI Attribution

Cancel obsolete Git refresh workers and watchdogs, index directory status, and avoid rebuilding terminal rows on glyph-cache hits. Complete feature coverage and restoration guidance across all website languages, with focused regression fixtures and contributor instructions.

Co-authored-by: Codex <noreply@openai.com>
@coderabbitai

coderabbitai Bot commented Dec 5, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@wzz6423
wzz6423 marked this pull request as ready for review December 5, 2026 02:56
@wzz6423
wzz6423 merged commit 429e371 into main Dec 5, 2026
26 checks passed
@wzz6423
wzz6423 deleted the perf/workspace-efficiency-docs branch December 5, 2026 03:26
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