Draft: Fix the top browser console errors in feature specs

What does this MR do and why?

spec/support/browser_console_allowlist.yml lists browser console errors that feature specs still log. This MR fixes the root cause of most entries and removes them. 10 entries remain:

  • 9 entries have no fix yet.
  • The at.js null (reading 'text') entry is removed by !263311 (merged), which bumps @gitlab/at.js to 1.5.11.

The fixes are independent of each other. Each row in the table below is a possible MR of its own.

  • Commit 1 has four entries that affect many specs. They are described in detail below.
  • Commit 2 has the others.

Entries, one row per fix

Allowlist entry (message) Cause Fix
Missing field 'project', 'job' Job page subscription wrote partial data job_app.vue updateQuery returns undefined
Missing field 'id' (FOSS) REST resolver used a marker object as the namespace work_items_rest_resolver.js maps the namespace from REST
Refused to apply style (FOSS) CE views link EE-only page bundles Three stylesheets move from ee/ to CE
computed value is readonly Stale: last caller removed Entry removed
undefined (reading 'clientWidth') GlBreadcrumb measured refs after unmount Entry removed. @gitlab/ui 138.6.1 on master has the fix from gitlab-org/gitlab-services/design.gitlab.com!6501 (merged)
GraphQL execution errors for query 'runners' Job assistant queried an admin-only field on load Query when the drawer opens, with an error handler
Missing field 'pipelines' Pipelines list subscription wrote partial data updateQuery returns undefined
Missing field 'commit', 'browseArtifactsPath' Jobs subscription selected fewer fields than the query Shared JobListItem fragment; skip null updates
subscriptionPermissions (2 entries) Usage quotas queried CustomersDot where the proxy answers 404 Query only when cdot_graphql_proxy is available
bad request: error building search request Zoekt query sent without a term, or with the * placeholder as a regex Skip without a term; send regex: false for *
Request failed with status code 404 Type filter fetched aggregations that only advanced search has Fetch only for advanced search
Missing field 'emailsDisabled', 'webPath' CE board optimistic response missed fields Add the fields
null (reading 'group') Swimlanes mapped a list query that was not cached Return the null list as is
subscription 'workItemNotes... Note subscriptions had no error handler Ignore subscription errors
Missing field 'discussions', 'discussionLocked' Note updates wrote to a cache entry without the notes widget hasCachedNotesWidget guard
undefined (reading 'push') Issuable list item used the router after visitUrl return after visitUrl (same as !260779 (merged))
null (reading 'projectRepositoryRegistries') Geo item page read a null node Null-safe update
null (reading 'getAttribute') Wiki table of contents read the anchor of headings without one Skip those headings
null (reading 'assigned'), 'recentlyViewedItems', destructure property 'id' Stale Entries removed. !257973 (merged) fixed them
apiFuzzingCiConfiguration and 5 related entries Stale Entries removed. Commit f41e3fa7 fixed them

Entries that stay

  • failed to parse query: the spec causes this error on purpose.
  • undefined (reading 'namespace'), null (reading 'close'), Geo undefined (reading 'queries'): not reproduced locally in a full run, and no fix found.
  • Merge request custom role subscriptions (todoId, state, mergeChecksState, issuable, Unauthorized subscription): not reproduced. These are probably timing-dependent, as the catalogue notes say.

Details for commit 1

Job page writes a partial result to the Apollo cache (9 specs)

vue-apollo 3 starts linked subscriptions together with their query and ignores the subscription's skip(). The server answers a new subscription at once with ciJobStatusUpdated: null. updateQuery then returned previousData, which is still empty or partial, and Apollo wrote it. The same pattern caused the pipelines and jobs list entries in commit 2.

Work item list writes a namespace without an id (FOSS only)

The REST resolver gets a marker object, { fullPath, isGroup }, to choose the endpoint. When an item lived in the listed namespace, mapNamespace returned that marker as the item's namespace. The marker has no id. EE did not log the error, because the EE wrapper passes its options object where CE expects the namespace. That argument mismatch is not changed here.

These CE views call add_page_specific_style with a bundle whose source exists only under ee/:

  • page_bundles/cycle_analytics
  • page_bundles/dev_ops_reports
  • page_bundles/registrations

computed value is readonly was stale

The warning came from the syncWithVuex Pinia plugin. The plugin lost its last caller when the Vuex notes store was removed.

How to verify

  • Feature specs: the entries are removed, so any example that still logs one of these errors fails. The FOSS-only fixes need the as-if-foss jobs.
  • Jest: each code fix has a test. The tests for the job app and pipelines app fail without the fix. All changed specs pass in Vue 2 and Vue 3.
  • Local GDK runs of all 31 allowlisted spec files (649 examples), before the rebase:
    • Commit 1, empty allowlist: the baseline reproduced the clientWidth, getAttribute, Zoekt, runners, pipelines and jobs errors.
    • Commit 2, with this allowlist: no removed error was logged, except the Zoekt regex error. It is fixed in the final commit, and its specs pass.
    • Other local failures in these files, such as wiki uploads, ViewTransition and ChunkLoadError after a dev server restart, also occur in the baseline. They are not in the CI allowlist.

References

Edited by Miguel Rincon

Merge request reports

Loading
Loading