Skip to content

Make Git Mog frictionless for first-time users - #36

Merged
gavinjudd merged 8 commits into
mainfrom
feature/v0.5.0-interaction-polish
Aug 26, 2026
Merged

Make Git Mog frictionless for first-time users#36
gavinjudd merged 8 commits into
mainfrom
feature/v0.5.0-interaction-polish

Conversation

@gavinjudd

Copy link
Copy Markdown
Owner

Outcome

This makes Git Mog’s first run, authorization, result hierarchy, and Private Context wording substantially easier to skim without changing scoring, winner selection, evidence, or privacy boundaries.

Authorization and interaction

  • The browser opens only after the user explicitly chooses authorization or passes --sign-in / --private-context.
  • Enter opens the same strictly validated GitHub page again while authorization is pending, with one launch per second and five manual reopens per authorization.
  • The manual GitHub link remains available whenever the browser does not open.
  • --no-open and GITMOG_NO_BROWSER=1 suppress automatic opening.
  • Missing and all-repository Private Context installations can be corrected and rechecked inside the same command; public-only and cancel paths remain explicit.
  • Public and private authorization remain separate.

Capability boundary

  • Exactly one shipped source module imports node:child_process, and it imports only spawn.
  • Allowed destinations are the GitHub device page, the reviewed Git Mog Private Context installation page, and the numeric GitHub App settings path returned through the reviewed flow.
  • Platform mappings are /usr/bin/open, native Windows rundll32.exe with url.dll,FileProtocolHandler, and /usr/bin/xdg-open when a Linux GUI session is present.
  • There is no shell, exec, fork, PowerShell, cmd.exe, environment-selected browser, arbitrary executable, general URL opener, or target-derived process argument.
  • Tokens, device codes, handles, repository data, and private identifiers cannot reach process arguments.
  • Zero runtime dependencies and zero install scripts remain.

Product and editorial changes

  • Ordinary help puts the first runnable command on line 4 and stays within one 80-column screen.
  • Rate-limit, public sign-in, Private Context, errors, and recovery use calm ordinary language.
  • Winner, score, coverage, mixed-context disclosure, decisive rounds, reads, previews, receipts, and next actions follow a skimmable hierarchy.
  • Private Context distinguishes codebase access, authorship matching, readable file samples, and long-running maintenance.
  • Code Quality is explicitly a sample and remains informational.
  • A surface-aware copy checker and deterministic first-time-user skim gate now cover ordinary output.
  • A 25-fixture meme editorial matrix keeps jokes specific, fact-backed, brief, and concentrated in battle surfaces.

Invariants

  • No scoring change.
  • No winner change.
  • No public request-plan, cache, evidence, coverage, rounds, verdict, or battle-key change.
  • Canonical v0.4.1 JSON and battle hashes remain exact.
  • Private Context remains outside the public score and winner.
  • Quality Judge remains preview-only with zero score influence.
  • Private source remains process-only, is never stored, and target code is never executed.

Acceptance evidence

  • Node 24.19.0 complete verification passed: 917 tests, one intentional skip.
  • Browser source and packed-bundle policy, security, Private Context policy, interaction, copy, quality, benchmark, community, and package acceptance passed.
  • macOS ARM64 public device authorization opened the default browser and continued in the same command; --no-open showed the manual fallback and cancelled cleanly. The separate live Private Context permission grant remains pending explicit safety approval.
  • Chrome Remote Desktop was reachable, but the authorized DESKTOP-GJUDD target was not listed. No physical native-Windows GUI claim is made. Hosted Windows x64/ARM64 evidence covers package and exact command construction only.
  • Hosted Linux x64/ARM64 and macOS Intel/ARM64 lanes cover packaging and command construction; they do not claim that a visible browser opened.
  • Package acceptance: 7 members, 1,653,356 compressed bytes, zero runtime dependencies, zero install scripts.

No npm version, npm stage, tag, GitHub Release, deployment, or repository-setting mutation is included in this PR.

Comment thread scripts/interaction-check.mjs Fixed

@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: a91251bdb1

ℹ️ 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 on lines +164 to +166
child.once("spawn", () => {
child.unref();
finish({ status: "opened" });

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Wait for the opener result before reporting success

When the platform opener starts but then exits unsuccessfully—for example, xdg-open finds no browser or URI handler—this resolves opened on the child’s spawn event, clears the 450 ms timeout, and never observes the exit status. Node’s spawn event only confirms that the child process spawned successfully, so the authorization UI incorrectly says “Browser opened” and suppresses the manual URL even though nothing opened; wait for a successful exit or treat an early nonzero exit as failed.

Useful? React with 👍 / 👎.

@gavinjudd
gavinjudd merged commit 24dcf61 into main Aug 26, 2026
20 checks passed
@gavinjudd
gavinjudd deleted the feature/v0.5.0-interaction-polish branch August 26, 2026 07:10
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.

2 participants