Repository navigation
Repair the Copy URL shortcut for Brave Origin profiles - #10308
Conversation
The shortcut repair in 1786643346 walked every Chromium-family profile root except Brave Origin's, which Omarchy has installed since before the extension id was pinned. Those profiles keep Alt+Shift+L bound to a ghost id, so Copy URL works from the toolbar but not the shortcut. Add the Brave Origin roots to the repair and rerun it through a new migration, following the same pattern as the T2 defaults rerun. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
quattro retired test/shell.d/copy-url-shortcut-migration-test.sh because 1786643346 had shipped and was frozen. This branch changes that migration again, and agents/skills/migrations.md keeps a dedicated test while a migration is being bugfixed, so the test stays with the Brave Origin case added. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1786643346 keeps the backup it writes beside every profile it repairs, and reads any backup as a repair still to verify. Rerun across every root, the follow-up asked everyone whose Chromium, Chrome or Brave profile the first pass had already fixed to close that browser again, and failed the migration queue when they declined. The rerun now sets profile_roots to the Brave Origin roots before sourcing, and the original keeps its full list when nothing set one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Codex Medium <noreply@openai.com>
|
Reviewed by Claude Opus 5.5, with Codex Medium as the second opinion, and verified on a worker built from the Omarchy ISO. The bug is real: Brave Origin loaded Copy URL through I pushed two commits to the branch:
On the worker, the migration test passes 15 of 15 and fails without the fix. The pull request is labelled |
[Medium impact] The PR appears safe to merge, with non-blocking gaps in the migration tests. FindingsSummaryAdds a Brave Origin-only rerun of the existing Copy URL shortcut repair.
Reviews (2) · Last reviewed commit: "Cut the Copy URL migration test down to ..." · Reviewed by Greptile |
| brave_origin_preferences="$home/.config/BraveSoftware/Brave-Origin/Default/Preferences" | ||
| mkdir -p "$(dirname "$brave_origin_preferences")" | ||
| jq -n --arg ghost "$ghost_id" '{extensions: {commands: {"linux:Alt+Shift+L": {command_name: "copy-url", extension: $ghost, global: false}}, settings: {}}}' >"$brave_origin_preferences" | ||
| HOME="$home" PATH="$stub_bin:$PATH" OMARCHY_PATH="$ROOT" bash -euo pipefail "$ROOT/migrations/1788604821.sh" >/dev/null 2>&1 || | ||
| fail "Brave Origin rerun migration repairs the shortcut" | ||
| jq -e --arg pinned "$pinned_id" '.extensions.commands["linux:Alt+Shift+L"].extension == $pinned' "$brave_origin_preferences" >/dev/null || | ||
| fail "Brave Origin rerun migration rebinds the Copy URL shortcut in a Brave Origin profile" | ||
| pass "Brave Origin rerun migration repairs Brave Origin profiles" |
There was a problem hiding this comment.
Beta and Nightly go untested The rerun test creates and checks only a Brave Origin stable profile, although the migration also names separate Beta and Nightly roots. A typo in either untested path could silently skip those profiles while the migration succeeds and is marked complete. Please add cases that verify both roots are repaired.
1788604821 dates from September and sorts ahead of 88 migrations quattro has since gained, so a late updater who declines its browser prompt would hold all of them pending. Numbered last, a decline holds nothing else. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The rerun runs on every machine after 1786643346, so listing Brave Origin in the shipped migration too only repaired it twice for late updaters, and a Brave Origin window opened between the two would be asked to close a second time. The shipped migration keeps just the hook that lets the rerun narrow its roots. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1aa1423 retired the full test once 1786643346 shipped and froze, and the cases restored here re-tested that frozen behaviour. What this change adds is the rerun, so the test keeps the two things it must do: reach a Brave Origin profile, and not ask again about a profile the first repair already fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| run_rerun || fail "Brave Origin rerun completes without prompting for profiles the first repair fixed" | ||
| jq -e --arg pinned "$pinned_id" '.extensions.commands["linux:Alt+Shift+L"].extension == $pinned' "$brave_origin" >/dev/null || | ||
| fail "Brave Origin rerun rebinds the Copy URL shortcut to the pinned id" | ||
| pass "Brave Origin rerun repairs Brave Origin and leaves already-repaired profiles alone" |
There was a problem hiding this comment.
The shortened test runs the new migration only once against a stale Brave Origin shortcut. It no longer checks a second run or an existing user-chosen shortcut, as docs/testing.md asks for migrations still being written. Add those cases for the Brave Origin rerun so changes that rewrite repaired profiles or replace custom bindings do not pass unnoticed.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Follow-up to #10292. The Copy URL shortcut repair in migration 1786643346 walked every Chromium-family profile root except Brave Origin's, even though Omarchy has installed Brave Origin since before the extension id was pinned. A Brave Origin profile that loaded Copy URL in that window still binds Alt+Shift+L to a ghost id, so with the native host now registered the extension works from the toolbar but the shortcut does nothing.
A new migration reruns the original repair on the Brave Origin, Beta, and Nightly roots alone, the same pattern as the T2 defaults rerun. The original only gains a hook that lets the rerun set its roots, so Chrome, Chromium and Brave users are not asked to close their browser a second time. Editing the original alone would not reach anyone who updated since mid August. The existing browser-open gating applies unchanged.
Spotted via #7448, thanks to @tahadx.
🤖 Generated with Claude Code