Repository navigation
Description
Which app
Mac
What you'd like
I would like Cra to show its own dialog when a user adds an extension, in place of Chromium's install dialog. The dialog needs a small engine change, because Swift cannot read the prompt's data today. Please tell me which look you want, and whether you accept the engine change. If you do, I can send the Swift side as a pull request once the engine carries the hook.
What happens now
When a user adds an extension (Web Store, a dropped .crx), Cra shows Chromium's own install dialog. Cra frames it over the window, but the dialog itself is Chromium's.
How Arc did it
Arc 1.176.0 shows its own dialog. It has a dark rounded panel. At the top is the Arc app icon, a left arrow and the extension's icon. The title is Add the "Snake" extension to Arc?. Under it is the line This extension requires no special permissions., or the list of permissions when the extension asks for some. Cancel has an ESC key cap. A blue Add Extension button has a Return key cap.
What Dia shows
Dia, by the same company, shows the same design with changes. The permissions are listed under It can: in a box. The title is Add "Claude" to Dia?. The button is Add to Dia, with a Return key cap.
Two variants
Cra can follow either one. The Arc variant copies Arc 1.176.0. The Dia variant copies Dia. I prefer the Dia variant, because Dia carries Arc's design further after Arc's development stopped. Either is fine for me, and the choice is yours.
Why it needs the engine
Swift gets only the window of Chromium's dialog. Sources/Cra/UI/Windows/ChromiumDialogs.swift hooks Chromium's window class to frame it. Swift never gets the prompt's data. It can read the title, the permission lines and the buttons from accessibility. It cannot read the extension's icon.
Two locked scenarios read Chromium's dialog today: extension-dialogs (#349) and extension-crx-drop (#593).
Proposed engine change
It follows cra-permissions.patch.
- A hook header,
engine/chromium/hooks/cra_extension_install_hook.h, whichapply.shcopies into the Chromium tree, as it does forcra_permission_hook.h. - A patch on
ShowExtensionInstallDialogImplinchrome/browser/ui/views/extensions/extension_install_dialog_view.cc. When Cra takes the prompt, the patch hands it to the hook. Otherwise Chromium shows its own dialog. - A new file,
engine/chromium/cra/extension_install_prompt.mm. It gives Swift the extension name, the dialog title, the icon, the permission lines and the prompt type. The prompt type lets re-enable and other prompts stay Chromium's. It also takes an accept or cancel answer from Swift. - The hook is set in
bridge.mm, besideg_permission_prompt.
I took the function names from public Chromium source. I have not checked them against 159.0.8154.45 yet, so they need that check.
After an engine build
- The title and the permission lines become CraCore decisions, with tests.
- The dialog is built in AppKit.
- A
cra://debugreadout shows the dialog's state. - A new scenario covers the dialog.
- The two locked scenarios,
extension-dialogsandextension-crx-drop, change to read Cra's dialog. This needs your yes.
Cra version
Version 0.1.59 (202611280246 · Chromium 159.0.8154.45)
Activity
tonibiocic commentedon Nov 30, 2026
@VictorKildahl, I would like your help with the choice between the two variants. I lean towards the Dia dialog. If the Dia variant is OK with you, I will build it.
VictorKildahl commentedon Nov 30, 2026
@tonibiocic Please do a match of both :D
We already use the Arc dialog many places, but i like the "It can" part of the dialog from dia.
tonibiocic commentedon Nov 30, 2026
@VictorKildahl then we have a deal 😇
I know that if they were still working on Arc, it would look like Dia.
We should make Arc 2027 one day :)
VictorKildahl commentedon Nov 30, 2026
@tonibiocic for sure, but that will be a separate overhaul all together☺️
tonibiocic commentedon Nov 30, 2026
@VictorKildahl totally agree. I'm really grateful for how you translated the essence of Arc to Cra. It was never about the look, it was about the feel :)
VictorKildahl commentedon Dec 1, 2026
@tonibiocic
How is this going my friend? :)
Need any help?
tonibiocic commentedon Dec 1, 2026
Going well, thanks! It's built and tested here: an engine patch that hands Chromium's install prompt to the page's window, and Cra's sheet (Arc's dialog with Dia's "It can:" box) that asks that real prompt.
On a locally built engine with the patch, the new scenario passes, and test.sh passes. I'm rebasing it onto 0.1.61 now and will open the PR as "Part of #998".
The one thing I'll need from you is an engine build with the patch: until then the sheet can't get the real prompt, and the new scenario fails on the pinned engine. The PR text explains it.
Extensions: Arc's install sheet with Dia's "It can:" box, drawn from …
Engine: Chromium's extension install prompt goes to the page's window…
Extensions: Cra's install sheet asks Chromium's real prompt when the …
Extensions: the docs for Chromium's real install prompt in Cra's sheet (
Docs: Arc parity has a row for the extension install sheet (VictorKil…
Tests: a Little Window's page asks its extension install prompt in Cr…
Tests: the install sheet's readout can list its permission lines, so …
Engine 159.0.8154.74-4: a DevTools session left on no page no longer …
Tests: on engine .74-4 an extension's install asks in Cra's own sheet…
Settings ▸ Extensions ▸ Install from .crx File…: a signed package goe…
VictorKildahl commentedon Dec 2, 2026
@tonibiocic's PR #1101 is on main, with the engine build it needed (159.0.8154.74-4).
What was wrong: adding an extension always showed Chromium's own install dialog, which isn't Arc's and could come up clipped or on the wrong window (#349). Cra had no way to show its own, because the engine never handed the prompt to the app.
What changed:
cra-extension-install-prompt.patch), with Chromium's own half-second wait before Add Extension takes a click..crxdropped onchrome://extensionsand Settings ▸ Extensions ▸ Install from .crx File… (Support installing signed .crx files directly (Settings → Extensions / drag & drop), not only unpacked folders #1065) ask in the same sheet.Tests that lock it:
ExtensionInstallAskTests(10 tests),DialogActionsTests.aHeldDefaultIsOffAndNothingElseIs,DialogPaletteTests.theInstallSheetsArrowAndBoxAreMixesOfTheInk, theDialogTestsharness and theextension-install-dialog-drawnscenario, all tagged #998. The #593, #349 and #1065 scenarios now install through the sheet.VictorKildahl commentedon Dec 2, 2026
Shipped in Cra 0.1.62: https://github.com/VictorKildahl/cra/releases/tag/v0.1.62. Cra updates by itself, or Cra ▸ Check for Updates… now. If something isn't right, reply here and I'll reopen it.
Thank you @tonibiocic, for the idea and for building it in PR #1101.