Skip to content

fix(prereq): gate history rewrite on filter-repo probe + README badges#16

Merged
ashproto merged 3 commits into
nextfrom
post-launch-fixes
Jul 16, 2026
Merged

fix(prereq): gate history rewrite on filter-repo probe + README badges#16
ashproto merged 3 commits into
nextfrom
post-launch-fixes

Conversation

@ashproto

Copy link
Copy Markdown
Owner

Two post-launch items.

1. Fix the Codex P2 from PR #14 — PrereqBanner claimed commit-time editing was disabled when the bundled git-filter-repo probe 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.

  • New shared singleton src/lib/prerequisites.svelte.ts (matches the makeX() idiom) — one probe, read by both the banner and the editing controls.
  • ApplyPanel disables the Rewrite button (with a tooltip) when canEditHistory is false, and rewrite() bails early (defense in depth for a destructive path).
  • Unknown / non-Tauri → treated as available, so nothing is blocked prematurely.
  • Verified: npm run check 0 errors, 288 tests pass. (Behavior is Tauri-only — the gate only activates when the native probe reports filterRepo: false.)

2. README badges — added Website (→ git-it.app) and License (CC BY-NC-SA 4.0 → LICENSE).

🤖 Generated with Claude Code

ashproto and others added 2 commits July 16, 2026 09:32
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>

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

Copy link
Copy Markdown

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: 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".

Comment thread src/lib/prerequisites.svelte.ts Outdated
… 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>
@ashproto
ashproto merged commit a7286b2 into next Jul 16, 2026
2 checks passed
@ashproto
ashproto deleted the post-launch-fixes branch July 16, 2026 22:11
ashproto added a commit that referenced this pull request Jul 18, 2026
Promote next → main: post-launch bug fixes (#16, #17, #18)
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