Skip to content

Revert "Remove the .repository-content fallback from the K2 dashboard" - #392

Merged
NicolasBonet merged 1 commit into
mainfrom
phs/k2-classic-layout-fallback
Oct 2, 2026
Merged

NicolasBonet merged 1 commit into
mainfrom
phs/k2-classic-layout-fallback

Conversation

@fukawi2

@fukawi2 fukawi2 commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Problem

This is a revert of bf8424c from #391.

The K2 dashboard does not render in Firefox. The console shows K2: could not find #ui-service-main-content to render the dashboard into.

Cause

GitHub still serves the classic repository page to some browsers. On Firefox, document.getElementById('ui-service-main-content') returns null and document.querySelector('.repository-content') returns the container. bf8424c removed the .repository-content fallback, so the dashboard has no container on the classic page.

This revert restores the fallback and the classic-only step that clears .repository-content before the dashboard renders. The React page still uses #ui-service-main-content.

Fixed Issues

None

Tests

  1. On Firefox, opened https://github.com/Expensify/App#k2 and saw the error above.
  2. In the Firefox console, ran [!!document.getElementById('ui-service-main-content'), !!document.querySelector('.repository-content')] and saw [false, true].
  3. Ran git diff a3aab57e -- src/js/module/dashboard/index.js and saw no output. The file matches its state before bf8424c.

Not tested: npm run lint, npm run build, and the dashboard on either browser after the revert.

This reverts commit bf8424c.

GitHub still serves the classic repository page, with .repository-content
and no #ui-service-main-content, to some browsers. Firefox gets it, so the
dashboard fails to render there.
@fukawi2 fukawi2 self-assigned this Oct 2, 2026
@fukawi2
fukawi2 requested a review from NicolasBonet October 2, 2026 04:22
@c3024

c3024 commented Oct 2, 2026

Copy link
Copy Markdown

GitHub is also serving the old repo pages on Chrome for me, so K2 is broken on Chrome too.

@fukawi2

fukawi2 commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @c3024 - looks like GitHub is doing a staged roll-out of their new UI. We're not in the blessed group (yet) 😄

@NicolasBonet

Copy link
Copy Markdown
Contributor

Looks good, sorry guys, I wasn't expecting this to be a phased rollout 🤦‍♂️

@NicolasBonet
NicolasBonet merged commit b461b8c into main Oct 2, 2026
5 of 6 checks passed
@NicolasBonet
NicolasBonet deleted the phs/k2-classic-layout-fallback branch October 2, 2026 13:23
@os-botify

os-botify Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

🚀 Released in version 1.5.69 🚀

@melvin-bot melvin-bot Bot added the Emergency label Oct 2, 2026
@melvin-bot

melvin-bot Bot commented Oct 2, 2026

Copy link
Copy Markdown

@NicolasBonet looks like this was merged without a test passing. These checks had not passed on c9328f1 when it was merged:

Please add a note explaining why this was done and remove the Emergency label if this is not an emergency.

@NicolasBonet

Copy link
Copy Markdown
Contributor

The checks were passing:

CleanShot 2026-10-02 at 8 52 33 AM@2x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants