Skip to content

Conversation

@Dimillian
Copy link
Owner

Motivation

  • Large preloaded git diffs can freeze the app even when the user isn't viewing them, so we need a user-facing toggle to disable background diff preloading while keeping the default behavior on.

Description

  • Add a Preload git diffs settings section and navigation entry in the settings UI with the subtitle Make viewing git diff faster, and a toggle wired to appSettings.preloadGitDiffs (frontend: src/features/settings/components/SettingsView.tsx).
  • Introduce preloadGitDiffs in the shared AppSettings types and defaults on the frontend and backend (src/types.ts, src/features/settings/hooks/useAppSettings.ts, and src-tauri/src/types.rs) and persist it via existing settings storage.
  • Wire the setting into the git controller: useGitPanelController now accepts gitDiffPreloadEnabled and gates background preload/loading logic so diffs are only preloaded when enabled or loaded on-demand when a file is explicitly selected (src/features/app/hooks/useGitPanelController.ts, src/App.tsx).
  • Update affected tests and test fixtures to include the new default setting (src/features/settings/components/SettingsView.test.tsx).

Testing

  • Ran npm run lint, which completed successfully.
  • Ran npm run test (Vitest), which passed: 52 test files, 259 tests total (all passed).
  • Ran npm run typecheck (tsc --noEmit), which completed successfully.
  • Ran cargo check in src-tauri to validate Rust changes; it failed in this environment due to a missing system dependency (glib-2.0 / pkg-config), so Rust build validation is blocked by the environment rather than code errors.

Codex Task

@Dimillian Dimillian changed the title Add Git diff preload toggle in Settings and respect it in diff loading feat: add Git diff preload toggle in Settings and respect it in diff loading Jan 31, 2026
@Dimillian
Copy link
Owner Author

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ef02020738

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Dimillian Dimillian merged commit 6c03623 into main Jan 31, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants