diff --git a/agents/frontend-triage/README.md b/agents/frontend-triage/README.md index fe816b1644..56956555f7 100644 --- a/agents/frontend-triage/README.md +++ b/agents/frontend-triage/README.md @@ -34,6 +34,7 @@ grouped: `mobile/android/android-components/`. - **Application updater** — `Toolkit :: Application Update` (`.sys.mjs`, IDL, C++). - **Windows installer** — `Firefox :: Installer` (NSIS). +- **Messaging System**: `Firefox :: Messaging System` (incl. about:welcome, feature callouts, Spotlight modal dialogs, Infobars). Install and update bugs are the odd ones out: they arrive as a failure with an error code and an `update.log` or installer log, usually with no steps to diff --git a/agents/frontend-triage/hackbot_agents/frontend_triage/config.py b/agents/frontend-triage/hackbot_agents/frontend_triage/config.py index c01bc06f05..f90bdda8d6 100644 --- a/agents/frontend-triage/hackbot_agents/frontend_triage/config.py +++ b/agents/frontend-triage/hackbot_agents/frontend_triage/config.py @@ -98,6 +98,7 @@ def key(self) -> str: "IP Protection", "#team-eng-ip-protection-triage", ), + ScopedComponent("Firefox", "Messaging System", "Messaging System", "#omc-triage"), ScopedComponent( "Firefox for Android", "History", "Firefox for Android", "#android-core-dev" ), diff --git a/agents/frontend-triage/hackbot_agents/frontend_triage/prompts/system.md b/agents/frontend-triage/hackbot_agents/frontend_triage/prompts/system.md index 4971b288d4..901ab793fe 100644 --- a/agents/frontend-triage/hackbot_agents/frontend_triage/prompts/system.md +++ b/agents/frontend-triage/hackbot_agents/frontend_triage/prompts/system.md @@ -46,6 +46,8 @@ Where to look, and what you will find there, depends on the bug's component: - `toolkit/components/ipprotection/docs/` has `StateMachine.rst`, `Preferences.rst`, `Constants.rst` and `Components.rst` — in-tree prose documentation, which none of the other areas here has. **Read it before reasoning about a state transition**; it is faster and more reliable than reconstructing the machine from the source. - A `browser/` → `toolkit/` split is in progress, so both trees can hold a plausible-looking copy of the same concern and the shallow local checkout may be behind. Prefer `search_identifier` / `find_definition`, which see the indexed revision, before citing a path. - Prefs are `browser.ipProtection.*`, registered in `browser/app/profile/firefox.js` — **not** `modules/libpref/init/all.js`. Strings are `browser/locales/en-US/browser/ipProtection.ftl`, and Glean metrics are in a `metrics.yaml` in each of the two directories. +- **Messaging System** — the in-product messaging surfaces: about:welcome, feature callouts, Spotlight modal dialogs, and Infobars. Desktop JS/JSM, CSS and XUL/HTML across three trees: `browser/components/asrouter/` (the router that decides which message shows, and the templates it shows them in), `browser/components/aboutwelcome/` (the onboarding and first-run flow), and `toolkit/components/messaging-system/` (the platform-agnostic layer, including the **JSON Schemas** message definitions are validated against). The router is shared by every surface, so work out which surface the reporter was on before reading any of the three — a bug in one surface is usually not in the router. + - **A message is data, not code.** Message definitions are delivered remotely and matched to a user by targeting expressions, so "I saw the wrong message", "I saw it twice" and "I never saw it" are usually a message-definition, targeting or frequency-cap problem rather than a defect in this tree. Say which of the two you think it is, and if it is the message rather than the code, say what would confirm that instead of planning a change against a definition you cannot see. A rendering or interaction bug in the surface itself is the ordinary case and localizes normally. - **Firefox for Android** — `mobile/android/`, with the Fenix app under `mobile/android/fenix/app/src/main/java/org/mozilla/fenix/` and the reusable components under `mobile/android/android-components/`. This is **Kotlin**, and it is structured as Fragment / Store / Middleware / View rather than as chrome markup plus a script: a `…Fragment.kt` owns the screen, a `…FragmentStore.kt` holds its state and actions, a `…View.kt` or a Compose function renders it, and a `…Middleware.kt` performs side effects. Layouts are Android XML under `mobile/android/fenix/app/src/main/res/layout/`, strings under `res/values/strings.xml`. Fenix is mid-migration to Jetpack Compose, so a screen may have both a `…View.kt` and a `…Composable.kt` and only one of them is live — check which the Fragment actually builds before planning against either. - **Android toolbar** — there are **two** toolbars, and a generation of the widget under each. The browser toolbar is `…/fenix/components/toolbar/` (`BrowserToolbarComposable.kt`, `BrowserToolbarMiddleware.kt`, `BrowserNavigationBar.kt`, `ToolbarPosition.kt` for top-versus-bottom, `BottomToolbarContainerView.kt`, `ToolbarsIntegration.kt`); the homepage has its own at `…/fenix/home/toolbar/` (`HomeToolbarComposable.kt`, `FenixHomeToolbar.kt`, `BrowserSimpleToolbar.kt`). So work out which surface the reporter was on first: a `Homepage` bug can localize into a toolbar file and a `Toolbar` bug into the homepage. Underneath both, android-components has the newer Compose widget at `mobile/android/android-components/components/compose/browser-toolbar/` and the older View-based one at `components/browser/toolbar/`, with `components/concept/toolbar/` holding the interface and `components/feature/toolbar/` the session wiring. Confirm which one Fenix builds before citing it — a fix planned against the retired implementation reads correct and changes nothing. - **Android homepage** — one screen assembled from one package per section, so "which section" comes before "which file". `…/fenix/home/HomeFragment.kt` owns the screen, the Compose UI is under `home/ui/` (`Homepage.kt`, `HomepageHeader.kt`, `SearchBar.kt`, `WallpaperBackground.kt`, `Wordmark.kt`), state is `home/store/HomepageState.kt`, side effects are `home/middleware/`, and the older controller/interactor pair is `home/sessioncontrol/`. Each section is its own subpackage: `topsites/`, `recenttabs/`, `recentsyncedtabs/`, `recentvisits/`, `pocket/`, `bookmarks/`, `collections/`, `setup/`, `sports/`, `mars/`, `logo/`, `privatebrowsing/`. A bug about the top-sites row or the stories feed is localized there, not in `Homepage.kt`. Note also that `Firefox for Android` has separate components for several of these sections — `Top Sites`, `Stories`, `Collections`, `Bookmarks`, `Menu`, `Search` — so the same code can be reached from more than one component, and `Stories` is `home/pocket/` in the tree because nothing was renamed. Triage the bug under the component it was filed in; do not retitle or re-scope it to match. diff --git a/agents/frontend-triage/hackbot_agents/frontend_triage/rules/frontend-triage.md b/agents/frontend-triage/hackbot_agents/frontend_triage/rules/frontend-triage.md index 09d87a1b70..a35d2dcc4e 100644 --- a/agents/frontend-triage/hackbot_agents/frontend_triage/rules/frontend-triage.md +++ b/agents/frontend-triage/hackbot_agents/frontend_triage/rules/frontend-triage.md @@ -7,6 +7,15 @@ the area whose code layout **Source repository** describes. Any user-facing Fire defect is in scope, though, whether or not its component is on that list; see `scoping.md`. +Typical components: + +- Desktop frontend, all under `Firefox`: `Tabbed Browser`, + `Tabbed Browser: Split View`, `New Tab Page`, `Address Bar`, `Menus`, + `Toolbars and Customization`, `Sidebar`, `Theme`. +- Android: `Firefox for Android :: History`. +- Install and update: `Firefox :: Installer`, `Toolkit :: Application Update`. +- Messaging System: `Firefox :: Messaging System`. + Desktop and Android bugs here are usually UI/UX papercuts, documented with a **video or screenshot** and steps to reproduce. @@ -34,9 +43,12 @@ Core, DevTools-internals, or build-system bug — and say which area it looks li `devtools/` (JS/JSM, CSS, XUL/HTML); Android under `mobile/android/` (Kotlin, Fragment/Store/Middleware/View); the updater under `toolkit/mozapps/update/` (`.sys.mjs`, IDL, C++); the installer under `browser/installer/windows/nsis/` - (NSIS `.nsi`/`.nsh`). Find the module, the markup or layout, and any relevant pref - (often `modules/libpref/init/all.js`, or `app.update.*` for the updater) that - governs the behaviour. Use the `investigator` subagent for deep searches. + (NSIS `.nsi`/`.nsh`); the Messaging System under `browser/components/asrouter/`, + `browser/components/aboutwelcome/`, `toolkit/components/messaging-system/` + (JS/JSM, CSS, XUL/HTML, JSON, JSON Schema). Find the module, the markup or layout, + and any relevant pref (often `modules/libpref/init/all.js`, or `app.update.*` + for the updater) that governs the behaviour. Use the `investigator` subagent for + deep searches. 2. **Confirm the area is still live.** Check the referenced code/strings still exist and aren't already changed by a recent commit. If the bug looks already fixed (e.g. cannot reproduce on a newer version per comments, or the code path diff --git a/agents/frontend-triage/tests/test_notify.py b/agents/frontend-triage/tests/test_notify.py index 002601337d..265698b90f 100644 --- a/agents/frontend-triage/tests/test_notify.py +++ b/agents/frontend-triage/tests/test_notify.py @@ -98,6 +98,7 @@ def test_the_channel_belongs_to_the_component(): def test_whitespace_around_either_half_is_stripped(): # Surrounding whitespace is the agent's, not Bugzilla's. assert channel_for(" Firefox ", " New Tab Page ") == "#hnt-dev-triage" + assert channel_for("Firefox", "Messaging System") == "#omc-triage" def test_the_registry_names_each_component_once():