Commit Graph

180 Commits

Author SHA1 Message Date
Michael Kaply
a11f5b9cfc Bug 1971973 - Add enterprise policy for Generative AI. a=RyanVM DONTBUILD
Original Revision: https://phabricator.services.mozilla.com/D263430

Differential Revision: https://phabricator.services.mozilla.com/D267306
2025-10-03 01:39:48 +00:00
Ed Lee
7f8d24c805 Bug 1975262 - remove hugging chat from chatbot a=pascalc
Hide from the list in onboarding and dropdown.

Original Revision: https://phabricator.services.mozilla.com/D255875

Differential Revision: https://phabricator.services.mozilla.com/D255920
2025-07-03 09:41:46 +00:00
Tim Xia
2bedf3f357 Bug 1969482 - key points collapsible header shown even for skipped regions - a=dmeehan DONTBUILD
Original Revision: https://phabricator.services.mozilla.com/D252537

Differential Revision: https://phabricator.services.mozilla.com/D252864
2025-06-06 18:57:42 +00:00
Tim Xia
84476b636e Bug 1969012 - Additional telemetry for link previews: labs options and about pages - a=dmeehan
- add telemetry "tab" field for start, cardlink, cardClose
- add labsCheckbox event for shift, shift_option, long_press, key_points, link_previews
- add _getTabContextValue to get the filepath for any about: pages
- update optin telemetry
- add metrics
- shift_alt and long_press name normalization
- add key_points (boolean) to card_link
- update test to test against blank
- refactor _getTabContextValue
- add tests for new metric and prefChanged

Original Revision: https://phabricator.services.mozilla.com/D251779

Differential Revision: https://phabricator.services.mozilla.com/D252692
2025-06-05 18:18:00 +00:00
Tim Xia
1d28e315f5 Bug 1969032 - Handle two types of onboarding card display - a=dmeehan DONTBUILD
- Update strings
- onboardingHoverLinkMs to 1 sec
- add type to onboarding card telemetry
- check current status of showOnboarding flag before renderOnboardingPanel

Original Revision: https://phabricator.services.mozilla.com/D251639

Differential Revision: https://phabricator.services.mozilla.com/D252521
2025-06-05 16:31:32 +00:00
Ed Lee
298a97a4e9 Bug 1969461 - shift-tab keyboard navigation through links unexpectedly triggers previews a=dmeehan
Treat tab as typing to ignore with rest of recent typing heuristics. Also catch other unexpected typing and clicks.

Original Revision: https://phabricator.services.mozilla.com/D251891

Differential Revision: https://phabricator.services.mozilla.com/D252419
2025-06-05 11:57:38 +00:00
Ed Lee
c89bcc4e0d Bug 1970208 - update mistral icon a=dmeehan DONTBUILD
Use new icon from mistral for lechat

Original Revision: https://phabricator.services.mozilla.com/D252383

Differential Revision: https://phabricator.services.mozilla.com/D252493
2025-06-05 11:53:58 +00:00
Ed Lee
ca8a9a951b Bug 1965588 - migrate link preview labs users expecting shift-alt and feature enabled for end of labs rollout r=txia,firefox-ai-ml-reviewers
Detect labs enrollment to keep enabled once and keep shift-alt shortcut with legacy prefs. Support prefs like chatbot.

Differential Revision: https://phabricator.services.mozilla.com/D250912
2025-05-24 06:17:12 +00:00
Tim Xia
52662d4efb Bug 1961212 - onboarding to introduce link preview - r=Mardak,fluent-reviewers,firefox-ai-ml-reviewers,bolsson
- entrypoint logic
- add close button
- update text and image on onboarding card
- don't re-render card if user hover around different urls
- use -panel-color for .og-card-title and .og-card-description
- add telemetry and tests
- add browser_link_preview_onboarding.js
- add link-preview-card-onboarding.css
- update failure message for failed test wait statement
- remove alt text for onboarding image
- refactor panel rendering code to initOrResetPreviewPanel
- refactor _onLinkPreview() to switch between linkpreview and onboarding card directly
- add openAtCurrentLocation
- add telemetry tests and onboarding test
- avoid adding multiple listeners
- replace without hide and reopen

Differential Revision: https://phabricator.services.mozilla.com/D249855
2025-05-24 02:51:15 +00:00
Aristide Tossou
26bdba4561 Bug 1967767 - Use isProbabablyReadable properly to keep Reader Mode and Link Preview in sync - r=txia,firefox-ai-ml-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D250846
2025-05-24 00:24:31 +00:00
Ed Lee
e432eb1623 Bug 1968047 - link preview opens in unexpected scenarios r=txia,firefox-ai-ml-reviewers
Only trigger long click with primary button. Ignore overlink after a delay and single page app links.

Differential Revision: https://phabricator.services.mozilla.com/D250901
2025-05-24 00:17:15 +00:00
Beth Rennie
4c73fb8946 Bug 1956080 - Use async experiment cleanup in browser_chat_nimbus.js r=firefox-ai-ml-reviewers,Mardak
ExperimentManager.unenroll() is now effectively async when running in a
browser test (because we are now executing SQL queries during
unenrollment) so all cleanup functions that trigger unenrollment are
async as well.

Differential Revision: https://phabricator.services.mozilla.com/D250551
2025-05-22 21:20:46 +00:00
Aristide Tossou
10eca827d5 Bug 1966713 - [linkPreview] Remove hyperlinks and simplify inputs from readability - r=txia,firefox-ai-ml-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D250441
2025-05-22 02:07:47 +00:00
Tim Xia
75d7f93d89 Bug 1967766 update styles for border and box shadow for Link preview card - r=ngrato,firefox-ai-ml-reviewers
- border radius and box shadow change

Differential Revision: https://phabricator.services.mozilla.com/D250469
2025-05-21 22:35:10 +00:00
Tim Xia
6d01ed57b0 Bug 1965281 - Do not display the "Retry" option if "out of memory" error in Link Preview card - r=Mardak,firefox-ai-ml-reviewers
- Change isGenerationErrorState to generationError, an object with the error from inference
- determine whether to showRetryLink based on error.name

Differential Revision: https://phabricator.services.mozilla.com/D250259
2025-05-21 15:38:39 +00:00
Tim Xia
eeb5878e20 Bug 1961215 - expand/collapse key points that persists across previews - r=Mardak,firefox-ai-ml-reviewers
- integration with opt-in
- fix skeleton alignment issues
- add test for toggle expand/collapse
- update optin telemetry tests
- add key_points_toggle telemetry and tests
- prevent key point generation if in-process or keypoints already exist for the card
- add todo comment for chevron icon
- reset telemery state
- update h3 to be available for accessibility api
- update for accessibility API
- remove feedback from metric description

Differential Revision: https://phabricator.services.mozilla.com/D249851
2025-05-21 12:46:00 +00:00
agoloman
63c83deb26 Revert "Bug 1606785 - Enable Prettier for CSS files r=desktop-theme-reviewers,Standard8,frontend-codestyle-reviewers,emilio" for causing multiple failures.
This reverts commit ec5fa1d4c0.

Revert "Bug 1606785 - Format Firefox CSS files with Prettier r=desktop-theme-reviewers,perftest-reviewers,places-reviewers,translations-reviewers,omc-reviewers,backup-reviewers,browser-installer-reviewers,sparky,dao,pdahiya,nrishel,kpatenio"

This reverts commit baa5d72bbd.

Revert "Bug 1606785 - Format browser/themes and toolkit/themes CSS files with Prettier r=desktop-theme-reviewers,pip-reviewers,tabbrowser-reviewers,places-reviewers,dao,mconley"

This reverts commit 9604b0a8ae.

Revert "Bug 1606785 - Format browser/themes/preferences CSS files with Prettier r=settings-reviewers,desktop-theme-reviewers,dao,mconley"

This reverts commit 686c1cf85f.

Revert "Bug 1606785 - Format urlbar CSS files with Prettier r=urlbar-reviewers,desktop-theme-reviewers,dao"

This reverts commit a7a4f31251.

Revert "Bug 1606785 - Format webcompat CSS files with Prettier r=webcompat-reviewers,denschub"

This reverts commit 41bc4d5237.

Revert "Bug 1606785 - Format search CSS files with Prettier r=search-reviewers,jteow"

This reverts commit 7bb7f82374.

Revert "Bug 1606785 - Format dom CSS files with Prettier r=emilio"

This reverts commit c22e910235.

Revert "Bug 1606785 - Format android CSS files with Prettier r=geckoview-reviewers,hiro"

This reverts commit c08e43fc3d.

Revert "Bug 1606785 - Format layout CSS files with Prettier r=layout-reviewers,dholbert"

This reverts commit 4f2a32d1a4.

Revert "Bug 1606785 - Format devtools CSS files with Prettier r=devtools-reviewers,nchevobbe,frontend-codestyle-reviewers"

This reverts commit c05f675ddf.

Revert "Bug 1606785 - Format recomp CSS files with Prettier r=reusable-components-reviewers,desktop-theme-reviewers,dao,mkennedy"

This reverts commit b10c7de8d0.

Revert "Bug 1606785 - Format sidebar CSS files with Prettier r=sidebar-reviewers,desktop-theme-reviewers,dao,nsharpley"

This reverts commit d32c555e37.

Revert "Bug 1606785 - Format shopping CSS files with Prettier r=shopping-reviewers,desktop-theme-reviewers,dao,rking"

This reverts commit 965887a708.

Revert "Bug 1606785 - Format profiles CSS files with Prettier r=profiles-reviewers,desktop-theme-reviewers,dao,mossop"

This reverts commit 8338860f74.

Revert "Bug 1606785 - Format genai and ml CSS files with Prettier r=firefox-ai-ml-reviewers,Mardak"

This reverts commit d66681f553.

Revert "Bug 1606785 - Format firefoxview CSS files with Prettier r=fxview-reviewers,desktop-theme-reviewers,dao,jsudiaman"

This reverts commit 530b815cad.

Revert "Bug 1606785 - Format aboutlogins, megalist, and form autofill CSS files with Prettier r=credential-management-reviewers,mtigley,desktop-theme-reviewers,dao"

This reverts commit 813c864381.
2025-05-21 04:49:28 +00:00
hannajones
d66681f553 Bug 1606785 - Format genai and ml CSS files with Prettier r=firefox-ai-ml-reviewers,Mardak
Differential Revision: https://phabricator.services.mozilla.com/D249169
2025-05-21 03:54:21 +00:00
Cristian Tuns
83a4726666 Revert "Bug 1961215 - expand/collapse key points that persists across previews - r=Mardak,firefox-ai-ml-reviewers" for causing bc failures in /browser_link_preview_telemetry.js
This reverts commit 386bdb731e.
2025-05-20 14:59:38 +00:00
Tim Xia
386bdb731e Bug 1961215 - expand/collapse key points that persists across previews - r=Mardak,firefox-ai-ml-reviewers
- integration with opt-in
- fix skeleton alignment issues
- add test for toggle expand/collapse
- update optin telemetry tests
- add key_points_toggle telemetry and tests
- prevent key point generation if in-process or keypoints already exist for the card

Differential Revision: https://phabricator.services.mozilla.com/D249851
2025-05-20 14:07:14 +00:00
Ed Lee
dc03b9efd9 Bug 1967131 - Using Shift while typing unexpectly triggers Link Preview on Windows r=txia,firefox-ai-ml-reviewers
Track recent typing and ignore shortcut if within pref controlled 1000ms.

Differential Revision: https://phabricator.services.mozilla.com/D249911
2025-05-19 22:51:36 +00:00
Ed Lee
6e871f0a57 Bug 1966483 - add long-press shortcut for link preview r=txia,firefox-ai-ml-reviewers
Detect long press if enabled and show preview after configurable 1s delay if not drag or mouseup.

Differential Revision: https://phabricator.services.mozilla.com/D249480
2025-05-17 22:46:54 +00:00
Tim Xia
842057e5ca Bug 1951146 - Provide button to generate ai preview with first time opt-in - r=Mardak,fluent-reviewers,firefox-ai-ml-reviewers,bolsson
- static skeleton animation
- start download / inference only after opt-in
- update model-optin to allow placing icon on either right or left depending on iconAtEnd
- update background-color of optin-wrapper
- add new prefs browser.ml.linkPreview.optin and browser.ml.linkPreview.collapse
- use css order attribute for placement of icon
- update to final text for opt-in modal
- don't generate key points if collapsed is true
- add optin test suite in browser_link_preview_optin.js
- add telemetry to link review optin
- remove learn more link
- refactor updateCardProperty

Differential Revision: https://phabricator.services.mozilla.com/D249104
2025-05-17 19:46:40 +00:00
Ed Lee
fc43311e2b Bug 1961210 - show link preview settings for the feature and related options, e.g., key points, keyboard shortcuts r=txia,fluent-reviewers,settings-reviewers,firefox-ai-ml-reviewers,bolsson,mstriemer
Add link preview related prefs not visible by default for now.

Differential Revision: https://phabricator.services.mozilla.com/D247542
2025-05-17 17:07:50 +00:00
Emilio Cobos Álvarez
b9b4aa5db3 Bug 1966979 - Set type=checkbox properly on genai menuitems. r=firefox-ai-ml-reviewers,Mardak
On Linux (and maybe macOS) this has always been broken.

Differential Revision: https://phabricator.services.mozilla.com/D249850
2025-05-17 13:51:29 +00:00
Ed Lee
ed576b67c8 Bug 1962297 - [Link Previews] The keyboard shortcut Shift + Alt should be changed, at least on Windows r=txia,firefox-ai-ml-reviewers
Support both shift and shift-alt switching default to just shift.

Differential Revision: https://phabricator.services.mozilla.com/D249213
2025-05-16 03:59:48 +00:00
Tim Xia
f2766c769b Bug 1958981 - add context menu entrypoint for link preview - r=Mardak,fluent-reviewers,firefox-ai-ml-reviewers,bolsson
- conditionally add menu item
- place of preview link is under Open Link in New Private Window
- .accesskey = r
- buildLinkPreviewMenu -> handleContextMenuClick
- add context menu test
- add more context menu conditionals, don't show it for non-link menus
- fix spacing in browser-context.inc
- fix tests by setting browser.ml.linkPreview.prefetchOnEnable to false

Differential Revision: https://phabricator.services.mozilla.com/D247404
2025-05-14 21:17:47 +00:00
Narcis Beleuzu
5c26e24f54 Revert "Bug 1958981 - add context menu entrypoint for link preview - r=Mardak,fluent-reviewers,firefox-ai-ml-reviewers,bolsson" for causing mochitests failures in browser_contextmenu.js
This reverts commit a7242e5eb3.
2025-05-14 04:09:12 +00:00
Tim Xia
a7242e5eb3 Bug 1958981 - add context menu entrypoint for link preview - r=Mardak,fluent-reviewers,firefox-ai-ml-reviewers,bolsson
- conditionally add menu item
- place of preview link is under Open Link in New Private Window
- .accesskey = r
- buildLinkPreviewMenu -> handleContextMenuClick
- add context menu test
- add more context menu conditionals, don't show it for non-link menus
- fix spacing in browser-context.inc

Differential Revision: https://phabricator.services.mozilla.com/D247404
2025-05-14 01:22:19 +00:00
Tim Xia
f69e73edb1 Bug 1962756 - add button to link preview to jump to settings - r=Mardak,firefox-ai-ml-reviewers,fluent-reviewers,bolsson
- update styles with moz-button
- redirect to #general-link-preview
- add dismiss event dispatch

Differential Revision: https://phabricator.services.mozilla.com/D248343
2025-05-09 22:57:00 +00:00
Tim Xia
1ff65b56f0 Bug 1958926 - Error state update for Link Preview - r=Mardak,firefox-ai-ml-reviewers,fluent-reviewers,bolsson
- retry for generation error
- update error message for when page is not supported
- Revert "error state update for eu region check"
- change from --text-color-disabled to --text-color-deemphasized
- update generation error message to "Something went wrong."
- only show "Visit Link" when generation is finished, same as footer
- move region check out of data check conditions
- refactor for fluent strings
- minor refactor logic flow for renderKeyPointsSection
- comment change for link-preview-generation-error-missing-data fluent string
- hotfix test

Differential Revision: https://phabricator.services.mozilla.com/D246485
2025-05-09 20:36:37 +00:00
Daniel Thorn
5a6f848c38 Bug 1959483 - Port tests from ExperimentFakes and ExperimentTestUtils to NimbusTestUtils in browser/components/genai r=nimbus-reviewers,firefox-ai-ml-reviewers,beth,Mardak
Differential Revision: https://phabricator.services.mozilla.com/D247008
2025-05-09 19:57:15 +00:00
Serban Stanca
1971b2ba9e Revert "Bug 1958926 - Error state update for Link Preview - r=Mardak,firefox-ai-ml-reviewers,fluent-reviewers,bolsson" for causing mochitests failures in browser_link_preview.js.
This reverts commit b3598a91d0.
2025-05-09 01:33:35 +00:00
Tim Xia
b3598a91d0 Bug 1958926 - Error state update for Link Preview - r=Mardak,firefox-ai-ml-reviewers,fluent-reviewers,bolsson
- retry for generation error
- update error message for when page is not supported
- Revert "error state update for eu region check"
- change from --text-color-disabled to --text-color-deemphasized
- update generation error message to "Something went wrong."
- only show "Visit Link" when generation is finished, same as footer
- move region check out of data check conditions
- refactor for fluent strings
- minor refactor logic flow for renderKeyPointsSection
- comment change for link-preview-generation-error-missing-data fluent string

Differential Revision: https://phabricator.services.mozilla.com/D246485
2025-05-08 23:34:34 +00:00
Ed Lee
ab1038a26d Bug 1920563 - Clean up / rename / relocate price.svg icon reused by chatbot r=desktop-theme-reviewers,firefox-ai-ml-reviewers,dao,ngrato
Move icon from components to themes

Differential Revision: https://phabricator.services.mozilla.com/D237984
2025-05-05 04:17:38 +00:00
Ed Lee
8d018ed99c Bug 1920563 - Clean up / rename / relocate password{-hide}.svg icons reused by chatbot r=mtigley,desktop-theme-reviewers,credential-management-reviewers,firefox-ai-ml-reviewers,dao,ngrato
Move icons to toolkit and remove aboutlogins' duplicates

Differential Revision: https://phabricator.services.mozilla.com/D237983
2025-05-05 04:17:34 +00:00
Ed Lee
4208efdf23 Bug 1920563 - Clean up / rename / relocate import-export.svg icon reused by chatbot r=desktop-theme-reviewers,places-reviewers,translations-reviewers,firefox-ai-ml-reviewers,dao,gregtatum,ngrato
Move icon to toolkit and remove translations' duplicate

Differential Revision: https://phabricator.services.mozilla.com/D237982
2025-05-05 04:17:31 +00:00
Tim Xia
4bf85ebf94 Bug 1957459 - add fluent strings for Link Preview "We can't preview this link" view - r=Mardak,fluent-reviewers,firefox-ai-ml-reviewers,ngrato,bolsson
- use "link-preview-visit-link" and "link-preview-error-message" directly
- move loading of linkPreview.ftl to inside lit component

Differential Revision: https://phabricator.services.mozilla.com/D243691
2025-05-01 15:20:51 +00:00
Beth Rennie
b03a810429 Bug 1961629 - Use ExperimentFeature.getEnrollmentMetadata() in browser/components/genai r=Mardak,firefox-ai-ml-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D246151
2025-04-29 23:26:30 +00:00
Ed Lee
7e38d55ea9 Bug 1959650 - simplify shortcuts listeners avoiding some duplication r=ngrato,firefox-ai-ml-reviewers
Refactor nested logic out of handleShortcutsMessage to set up on first usage instead of each ShowShortcuts. Remove duplicate states: active, type and panel. Restore #ask-chat-shortcuts to limit width of warning.

Differential Revision: https://phabricator.services.mozilla.com/D246698
2025-04-26 13:36:41 +00:00
Tim Xia
07eb62892f Bug 1962264 - skip generation and key points section for certain regions - r=Mardak,firefox-ai-ml-reviewers
- add _isRegionSupported for enabled && lazy.prefetchOnEnable

Differential Revision: https://phabricator.services.mozilla.com/D246589
2025-04-26 06:25:30 +00:00
Aristide Tossou
0ee0f5eeff Bug 1962761 - [linkPreview] Update Model Prompt - r=Mardak,firefox-ai-ml-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D246786
2025-04-26 02:54:19 +00:00
Aristide Tossou
8ca3a9fb31 Bug 1962767 - [linkPreview] Make blocklist case independent - r=Mardak,firefox-ai-ml-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D246788
2025-04-26 00:25:45 +00:00
Ed Lee
70d6a3bd18 Bug 1945949 - chatbot provider icon in sidebar tool has inconsistent weight r=txia,firefox-ai-ml-reviewers
Use updated icons and reduce onboarding icon sizes.

Differential Revision: https://phabricator.services.mozilla.com/D246710
2025-04-25 21:26:28 +00:00
Tim Xia
09e6bfa925 Bug 1962237 - add fluent strings for reading time in Link Preview card - r=Mardak,fluent-reviewers,firefox-ai-ml-reviewers,bolsson
Differential Revision: https://phabricator.services.mozilla.com/D246479
2025-04-25 01:22:12 +00:00
camachoh
fce9ba1bc5 Bug 1323331 - Improve reader mode code dealing with detected language/direction. r=Gijs,firefox-ai-ml-reviewers,Mardak
Differential Revision: https://phabricator.services.mozilla.com/D244820
2025-04-22 18:17:32 +00:00
Tim Xia
5aa2cc1632 Bug 1958982 - more preview panel polish, e.g., always show site name - r=Mardak,firefox-ai-ml-reviewers
- add site name fallback
- add visit page and icons
- move visit page position to bottom

Differential Revision: https://phabricator.services.mozilla.com/D244896
2025-04-22 17:40:05 +00:00
Rob Wu
62248a8bcc Bug 1953004 - Run test-manifest-toml --fix on all toml files in the trees r=credential-management-reviewers,places-reviewers,desktop-theme-reviewers,Standard8,devtools-reviewers,hjones,jmaher,jdescottes,dimi,necko-reviewers,sidebar-reviewers,jsudiaman,kershaw
This diff was generated as follows:

List all toml files in the tree:

`find * -name '*.toml' > /tmp/toml`

Manually edited /tmp/toml to drop non-relevant entries (objdir).

Ran the toml linter for all files:

`cat /tmp/toml | xargs ./mach lint -l test-manifest-toml --fix`

Differential Revision: https://phabricator.services.mozilla.com/D240948
2025-04-14 08:30:13 +00:00
Tim Xia
a5eb2cfb05 Bug 1954812 - show animated skeleton of 3 points replaced by generated content - r=Mardak,firefox-ai-ml-reviewers,ngrato
- use tab-group-suggestions loading animation color
- set progressPercentage to init to 0
- add non-impactful references to the CSS variables to satisfy the test browser_parsable_css

Differential Revision: https://phabricator.services.mozilla.com/D243322
2025-04-12 03:44:29 +00:00
Cristina Horotan
3884d2b5ac Backed out changeset 36723da90fe1 (bug 1954812) for causing bc failures at browser_parsable_css.js CLOSED TREE 2025-04-11 22:32:58 +03:00