Skip to content

Repair the Copy URL shortcut for Brave Origin profiles - #10308

Merged
ryanrhughes merged 6 commits into
quattrofrom
brave-origin-copy-url-repair
Oct 20, 2026
Merged

ryanrhughes merged 6 commits into
quattrofrom
brave-origin-copy-url-repair

Conversation

@dhh

@dhh dhh commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

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

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>
@dhh
dhh requested a review from ryanrhughes as a code owner September 5, 2026 10:51
@omarchybot omarchybot added the bug Something isn't working label Sep 27, 2026
omarchybot and others added 2 commits October 2, 2026 06:29
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>
@omarchybot omarchybot added the verified Omarchy Triage has verified that this issue is ready for final review label Oct 2, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

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 --load-extension before the extension id was pinned in 6565a40, so its profiles can hold a ghost Alt+Shift+L binding, and on quattro migrations/1786643346.sh leaves a Brave Origin profile with that binding untouched. At the new head the follow-up rebinds it to the pinned id, and with the fix reverted the binding survives again.

I pushed two commits to the branch:

  • Merged quattro. The branch conflicted because quattro retired test/shell.d/copy-url-shortcut-migration-test.sh in 1aa1423. I kept the test, because agents/skills/migrations.md keeps a dedicated test while a migration is being bugfixed, and this pull request changes 1786643346 again.
  • Scoped the rerun to Brave Origin. Codex found this one, and I reproduced it before fixing it. 1786643346 keeps Preferences.omarchy-copy-url-repair.bak beside every profile it repairs, and it reads any backup as a repair it still has to verify. Run across every root, the follow-up would have asked everyone whose Chromium, Chrome or Brave profile the first pass already fixed to close that browser again, and it would have failed the migration queue if they declined. 1788604821.sh now sets profile_roots to the three Brave Origin roots before sourcing, and the original keeps its full list when nothing has set one. A new test case covers a repaired, open Chromium profile during the rerun.

On the worker, the migration test passes 15 of 15 and fails without the fix. migrate-scope, migrate-wrapper, migrate-notify, chromium-copy-url, update-hook-security and privileged-heredoc pass too. Codex reviewed the final head a second time and found nothing. It had already seen my reasoning, so its agreement is not guaranteed to be independent, but the backup finding was its own.

The pull request is labelled verified but not ready. ./test/cli stops at vscode generated theme references current theme file, and it fails in exactly the same place on quattro (821ae58). Whatever is wrong there is not caused by this change, but the rest of that suite did not run on either tree. CI reports no checks. This now waits on the maintainer.

@greptile-apps

greptile-apps Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge, with non-blocking gaps in the migration tests.

Findings

  1. P2 Repeated repairs go unchecked ▶
  2. P2 Beta and Nightly go untested ▶

Summary

Adds a Brave Origin-only rerun of the existing Copy URL shortcut repair.

  • Brave Origin profiles now get the Copy URL shortcut repair.

Reviews (2) · Last reviewed commit: "Cut the Copy URL migration test down to ..." · Reviewed by Greptile

Comment on lines +244 to +251
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"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 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.

ryanrhughes and others added 3 commits October 20, 2026 02:22
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>
Comment on lines +40 to +43
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"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Repeated repairs go unchecked

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants