fix(prereq): gate history rewrite on filter-repo probe + README badges#16
Merged
Conversation
Codex flagged (PR #14) that PrereqBanner's "Commit-time editing is disabled" was cosmetic: the check lived in the banner's local state, so ApplyPanel still enabled "Rewrite history" whenever dates were queued — letting the user confirm the destructive op (and create a backup) before it inevitably failed for lack of a working git-filter-repo. Lift the probe into a shared singleton (prerequisites.svelte.ts) so the banner and the editing controls read the SAME result. ApplyPanel now disables the Rewrite button (with an explanatory tooltip) when canEditHistory is false, and rewrite() bails early as defense in depth. Unknown/non-Tauri → treated as available so nothing is blocked prematurely. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Website badge → git-it.app (NERV orange), license badge → the CC BY-NC-SA 4.0 LICENSE file, alongside the existing CI/release/downloads/platform/tauri badges. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1052e720e0
ℹ️ 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".
… the gate Codex flagged (PR #16) that load() cached the resolved promise forever, so after a successful probe with a negative result there was no way to re-run it — if the user installed the Command Line Tools (or otherwise fixed a prereq) while Git It stayed open, the banner and the disabled Rewrite button persisted until restart. Add prerequisites.refresh() (forces a fresh probe) and call it from PrereqBanner on window `focus` while a prerequisite is still missing — reliably catching the return-to-app moment after the async `xcode-select --install` finishes. Stops re-probing once everything's present. load() stays deduped. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two post-launch items.
1. Fix the Codex P2 from PR #14 — PrereqBanner claimed commit-time editing was disabled when the bundled
git-filter-repoprobe failed, but that state was local to the banner.ApplyPanel's "Rewrite history" (the sole rewrite entry point — used in the drawer and the CommitDetail inline edit) stayed enabled, so a user could confirm the destructive op and even create a backup before it inevitably failed.src/lib/prerequisites.svelte.ts(matches themakeX()idiom) — one probe, read by both the banner and the editing controls.ApplyPaneldisables the Rewrite button (with a tooltip) whencanEditHistoryis false, andrewrite()bails early (defense in depth for a destructive path).npm run check0 errors, 288 tests pass. (Behavior is Tauri-only — the gate only activates when the native probe reportsfilterRepo: false.)2. README badges — added Website (→ git-it.app) and License (CC BY-NC-SA 4.0 → LICENSE).
🤖 Generated with Claude Code