* Allow tab activation with Ctrl+ScrollWheel when scrollable tab strip is enabled.
We just disabled the feature but we still want to allow the user to activate
the adjacent tab with Ctrl+ScrollWheel.
* Add test
Extends the brave-core socket-fix workflow to accept optional commit
hashes for web-discovery-project (DEPS) and @brave/leo (package.json).
When provided, the workflow updates these references before running
socket fix, enabling a single PR for both upstream hash bumps and
direct transitive dependency fixes. Also makes issue_link required
so brave-core PRs always close the tracking issue.
Prior to the current fix `AppMenu::OnMenuClosed` was called before
`menu_metrics_->RecordMenuDismiss`.
On macOS, entering full screen while the menu is open causes
`AppMenu::OnMenuClosed` call to trigger destruction of `BraveAppMenu`,
leaving `menu_metrics_` dangling by the time `RecordMenuDismiss` executes.
Reordering ensures `menu_metrics_` is accessed before `BraveAppMenu` is
destructed.
This PR adds authorship reassingment to brockit. This feature will allow
anyone to reassing the author of any given commit in a `cr` branch. This
is important to maintain our git history closer to the reality of who
should have attribution for each change.
The basics are:
```sh
tools/cr/brockit.py reassign <commit_hash>
```
The `reassign` command creates an empty commit with a `reassing!`
prefix, similar to a simple `fixup` change. However, this is only then
picked up when running `rebase` with `--squash-minor-bumps`.
```
tools/cr/brockit.py rebase --squash-minor-bumps
```
At this point the reassign change is moved above the original change,
and the original change is then squashed into the reassign change,
resulting on a natural change of authors as the original commit is
collapsed into the reassignment one.
Notes on discussions relating to this feature design:
In this particular implementation for this PR, it is necessary to call
rebase `--squash-minor-bumps` to have the necessary
reordering/squashing dance to take place that results in the authorship
being swapped (it is perfectly possible to drop `--squash-minor-bumps`
as a requirement, and make reassignment handling integral to regular
brockit rebase but I kept it behind that flag for now for the sake of
expediency).
- Pros: with this method, one can flag a commit for reassignment, but
doesn't need to immediately force push the branch, as the
reassignment only takes place once the daily rebase occurs.
- Cons: Brockit handles the commit message readjustment that is
necessary when squashing the original commit into the reassignment
commit, however if brockit rebase `--squash-minor-bumps` runs into
rebase conflicts, this breaks the editing chain, and requires the
user to manually call `git rebase --continue` and manually fix the
commit message for the squash. This is not a big deal as we already
do this for the minor bumps messages whenever conflicts occur, but
it is a break on automation flow. There could be room for something
like `brockit rebase --continue` to be honest. The other issue is
that we are adding extra tasks to the whole rebase thing, and
unknown bugs could end up interacting with each other (hopefully
won't ever be the case). Of less importance, but still of notice,
there are particular cases I have not completely tested, like
reassigning a bump commit (e.g. Conflict-resolved patches from
Chromium, etc) that is supposed to be squashed when squashing bumps,
so there could be concerns about both types of squash interacting,
which would either require better rebase checks for these corner
cases, or preventing users from reassigning authorship for brockit
generated commits (both options a no biggie).
There is a different way of going about this that this PR has not
pursued: `brockit reassing` immediately rebases doing the whole
reordering/squashing. This means each call to reassign does create a
`reassign!` commit but it immediately runs an interactive rebase to
squash it with the change it is targeting.
- Pros: no chance for conflicts during this process, which means that
the user would never have to deal with occasionally having to edit
the the commit message due to rebase conflicts. It also removes any
of these concerns from brockit's rebasing code, leaving less room
for bugs, as no squashing of fixups would be taking place.
- Cons: An imediate `rebase --interactive` would mean partial
rewrites of the tree, which requires force pushes to origin.
This alternative approach seemed a bit more work to implement. Later,
if preferred, we could also provide this second option with a flag
(e.g. `brockit reassign --now`) and reuse most of the implementation
details for the rebase case.
Resolves https://github.com/brave/brave-browser/issues/54151
Use upstream page content extraction pipeline
Enable the upstream PageContentAnnotationsWebContentsObserver by:
- Overriding OptimizationGuideKeyedServiceFactory to return the service
when kHistoryEmbeddings is enabled (even with kOptimizationHints
disabled), so PageContentAnnotationsService can construct
- Overriding PageContentAnnotationsServiceFactory and
PageContentExtractionServiceFactory to check kHistoryEmbeddings
instead of upstream ShouldEnablePageContentAnnotations
The OptimizationGuideKeyedService is safe to enable because Brave
blocks remote fetching via IsUserPermittedToFetchFromRemoteOptimizationGuide
returning false.
* [Brave Origin] Set window icon on startup dialog
The BraveOriginStartupView did not override any WidgetDelegate icon
methods, causing incorrect icons in taskbars/menus on Linux and macOS.
Override GetWindowAppIcon(), GetWindowIcon(), and ShouldShowWindowIcon()
to return the branded product logo (IDR_PRODUCT_LOGO_128).
* Add chrome_unscaled_resources GN dependency for window icon
Resolvesbrave/brave-browser#54259
Update the extrinsic generating code to use transfer_keep_alive instead of
transfer_allow_death. This only requires adding one new call index and then
using it in a few select places for extrinsic generation. Note that
transfer_allow_death and transfer_keep_alive have the same call signature so we
don't need to change the parameters we pass in.
The token embedding matrix de-quantization process is responsible for high peak memory usage. Instead of loading and de-quantizing the entire matrix during model init, we can de-quantize only the necessary tokens during model inference. This reduces peak memory usage by a huge margin, albeit with a small increase in latency. For our intended use-case (semantic history search) this balance of memory vs latency is optimal.
Allow the check on Linux and macOS
The JDK may not be available on macOS CI (upstream only checks it out on
Linux/Android). Silently skips when the binary is missing.
We should use network's native token as the `fromToken` value instead of searching for the first matching coin type and chain id in the token list.
Since it may gives wrong token based on the token order.
* Show restart banner on Brave Origin settings page when dirty
Adds a restart notification bar to the Brave Origin settings page
that appears when policy values have changed since browser startup
or when a first purchase is detected mid-session.
Backend: BraveOriginService snapshots policy values at construction
and exposes NeedsRestart() via a new Mojo GetNeedsRestart() method.
A new kOriginPoliciesWereEnforced pref persists enforcement state
across sessions to reliably detect first-purchase vs existing.
Frontend: Uses Chromium's RelaunchMixin for proper restart handling,
shows a fixed-bottom banner with an Origin-specific message, and
re-checks restart state after every toggle or reset.
* Remove redundant in-class initializer for startup_was_enforcing_
The constructor always sets this from the pref, so the default is
never used.
* Fix rebase: register both kOriginPurchaseValidated and kOriginPoliciesWereEnforced
The rebase conflict resolution incorrectly replaced kOriginPurchaseValidated
with kOriginPoliciesWereEnforced, but these are separate prefs.
SetPurchased() still writes kOriginPurchaseValidated, so both must be
registered in test SetUp.
Only apply PDF file limits when text extraction fails
PDFs with extracted text are sent as text content blocks, not raw
file bytes, so they don't need to be subject to the Bedrock API
limits (MAX_DOCUMENTS=5, MAX_DOCUMENT_SIZE_BYTES=4.5MB). Only
enforce these limits for raw PDFs where extraction failed or
timed out.
All toolbar variants (upstream and Brave) are persisted to SharedPreferences as integers.
Upstream guards against shifts by using explicit numeric assignments in the header.
Brave values must do the same — if they are defined implicitly and upstream inserts a new entry above them, the whole range shifts and users lose their saved setting.
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/c6ef9d2f680a39f97473af883b8fc394b581b6c0
commit c6ef9d2f680a39f97473af883b8fc394b581b6c0
Author: Bhuvana Betini <bbetini@google.com>
Date: Thu Feb 12 09:55:15 2026 -0800
[Glic] Add CPA toolbar entrypoint
This CL implements a baseline CPA entrypoint for Glic on Android. It
introduces the GlicToolbarButtonController to manage UI and on-click
handling. Also, it introduces the GlicActionProvider for future
conditional cueing logic. The dataflow integrates Glic into the
segmentation platform model to allow for conditional button display and
registers the new button type in histogram metrics for tracking.
Because the flag is not by set by native and the button is added to
the toolbar, a Cached Flag is used to prevent NPEs for unit tests.
In future CLs, the Glic button will have proper styling, be hooked up to
bottom sheet, and use data from contextual_cueing_service to be
conditionally shown.
Bug: 475590295
Change-Id: Ic31cd0c7ab1428abc679e330e6da86cb8531914c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7551433
Reviewed-by: Salvador Guerrero Ramos <salg@google.com>
Commit-Queue: Bhuvana Betini <bbetini@google.com>
Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1584071}
In V1 mode, Brave's custom SidePanel class replaces upstream's globally
via chromium_src. This means the toolbar_height_side_panel_ (an upstream
feature) gets Brave's GetMinimumSize() returning kDefaultSidePanelWidth
(400) instead of upstream's kSidePanelDefaultContentWidth (360).
Upstream's CalculateHorizontalLayout checks whether the toolbar-height
side panel fits beside the toolbar: remainder = window_width -
toolbar_min - padding. The test sets window_width = toolbar_min + 400,
giving remainder ~392. With upstream's min of 360, 392 >= 360 passes
and the panel is clamped correctly. With Brave's 400, 392 < 400 forces
the panel into content-height mode where it gets full width unclamped.
On normal Brave builds this was masked: when the sidebar is visible, its
minimum width contribution to the browser's overall GetMinimumSize()
prevents the window from being sized small enough to trigger the issue.
PR #35233 set kShowNever for Origin builds, removing that sidebar
contribution and exposing the incompatible minimum width.
Fix by making GetMinimumSize() type-aware: toolbar-height panels use the
upstream-compatible minimum (360), content-height panels (inside the
sidebar) keep kDefaultSidePanelWidth (400).
Resolvesbrave/brave-browser#54206
The maybeHideRewardsLayout() method controls rewards icon visibility on
tablets based on width but didn't check BraveRewardsPolicy, causing it
to override the main visibility logic that correctly hides the icon when
rewards are disabled.
Resolves: https://github.com/brave/brave-browser/issues/54358
Disable UpdateMetricsProviderBrowserTest.RunInBackground in cross-platform filter
Move the test from browser_tests-windows.filter to browser_tests.filter so it
is disabled on all platforms (Linux, macOS, Windows). The upstream flake affects
any platform where a previous test subprocess exits uncleanly.
Resolvesbrave/brave-browser#54247
The tab helper allows the SerpMetricsService to record SERP
metrics on iOS by observing navigations and classifying them as
search engine results page.
The test expected GetDefaultPrefValueForMetricsReporting() to return
true for beta/dev/nightly channels, but on origin-branded builds the
function unconditionally returns false (added in 2d48fb7f59). Update
the test expectations to account for IS_BRAVE_ORIGIN_BRANDED.
Resolvesbrave/brave-browser#54242
Resolves - no issue as this is just simple cleanup
I think it was for separator between VT and sidebar if both are on same side when rounded corners is on.
However, it doesn't work and it's not visible at all. No one cares about it. No test.
It just adds code complexity. Let's remove. We can revisit if we want it.
* Add 'No container' option to Container context menu
This tells the user that a tab is not in any container. And when it's
activated, it will be opened the tab or url without a container, which
allows the user to open the tab or url from a container.
* Update max items
Extract shared WebContentsDelegate overrides, WebContents creation,
temp file handling, timeout logic, and cleanup into a common base
class. PdfTextExtractor becomes a thin subclass implementing only
PDF-specific extraction via PDFDocumentHelper.
Three virtual methods are introduced for the base class pattern:
- OnDocumentReady(): called when the document is loaded and ready
for text extraction
- DocumentOnLoadCompletedInPrimaryMainFrame(): default implementation
calls OnDocumentReady(). PdfTextExtractor overrides this to no-op
since it uses DidFinishLoad → TryRegisterForDocumentLoad instead.
- AdditionalUnsandboxFlags(): returns extra sandbox flags to remove
(PdfTextExtractor returns kPlugins for MimeHandlerView)
This prepares for TextFileExtractor to reuse the same base class.
* Make attachment elements full-width
Add width: 100% to .leftSide and .info in components/ai_chat/.../attachment_item/style.module.scss so attachment content can expand and align correctly; remove max-width: 400px from .attachmentChipSingle in components/ai_chat/.../input_box/style.module.scss to allow the chip to size flexibly without being clipped.
* Update style.module.scss