Skip to content

Temporary Doors CI trial (CSS) - #1280

Closed
LukasWallrich wants to merge 2 commits into
rebrand-doorsfrom
scratch-rebrand-ci-css
Closed

LukasWallrich wants to merge 2 commits into
rebrand-doorsfrom
scratch-rebrand-ci-css

Conversation

@LukasWallrich

@LukasWallrich LukasWallrich commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Timing trial for #1278. This draft bypasses the infrastructure-change trigger to exercise core checks against rebrand-doors. It will be closed after CI.


Summary by cubic

Trial run to time the Doors preview CI with scoped checks, using a CSS-only change so the new core slice runs. This PR will be closed after CI completes.

The rebrand preview workflow now builds the PR base alongside the candidate, diffs the generated HTML, and runs the design and axe browser checks only on the changed pages. CSS/JS-only changes run a small core sample: the named screens, breakpoints, sample pages, home, floating controls at 390 and 1440 px, and every fourth article in the usual article set. Pushes, the full-checks label, workflow or check-script changes, and diffs over 60 pages still run the full suite. Chromium is cached by Playwright version, and runs with no relevant changes report success without starting the browser.

Includes a one-pixel change to --page in assets/css/doors/tokens.css to trigger this trial.

Written for commit e54c884. Summary will update on new commits.

View guided diff Turn on auto-fix

@LukasWallrich
LukasWallrich requested a review from a team as a code owner November 21, 2026 11:32
@LukasWallrich
LukasWallrich marked this pull request as draft November 21, 2026 11:32
@github-actions

Copy link
Copy Markdown
Contributor

👍 All image files/references (if any) are in webp format, in line with our policy.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Spell Check Passed

No spelling issues found when checking 6 changed file(s)! 🎉

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

7 issues found across 7 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="scripts/tests/test_rebrand_changed_pages.py">

<violation number="1" location="scripts/tests/test_rebrand_changed_pages.py:44">
P3: `test_selection` never sets a page in `changed`, so a regression that drops modified pages from the selection would still pass. Add a case with `"changed": ["/"]` and expect `"changed"` mode with `{"/"}`.</violation>
</file>

<file name="scripts/rebrand/changed_pages.py">

<violation number="1" location="scripts/rebrand/changed_pages.py:30">
P2: Only `.html`, `.css` and `.js` are inventoried, so changes to fonts or images with unchanged names are invisible. Such a change yields mode `none` and skips the design and axe checks. Include other asset types in `bundles`, or document why they are excluded.</violation>

<violation number="2" location="scripts/rebrand/changed_pages.py:60">
P2: A mixed change (CSS/JS bundle plus any page change) selects `changed`, so the `core` sample is skipped. Site-wide style regressions then go unchecked on pages whose HTML did not change. Run the core sample whenever `bundles_changed` is true, in addition to the changed pages.</violation>
</file>

<file name="scripts/rebrand/check_design.py">

<violation number="1" location="scripts/rebrand/check_design.py:1073">
P2: This cross-page assertion runs only when both `/` and `/resources/` change, while the section is selected only for `/resources/`; trigger it when either page changes and include both paths in the section selection.</violation>

<violation number="2" location="scripts/rebrand/check_design.py:1668">
P2: These whole-build checks now run only in full mode, so a CSS-only change to `icons.css` can drop an icon with no failure. They are cheap scans and do not depend on the selected pages. Keep them running whenever a build is given.</violation>
</file>

<file name="scripts/rebrand/check_axe.py">

<violation number="1" location="scripts/rebrand/check_axe.py:79">
P3: The new changed-page branch re-adds `/404.html` when its HTML changes, which undoes the `sample.pop("404", None)` exclusion above. Full runs skip that page, so filter it out here as well.</violation>
</file>

<file name=".github/workflows/rebrand-preview.yaml">

<violation number="1" location=".github/workflows/rebrand-preview.yaml:73">
P2: PRs changing only this workflow or a check script still set `scoped=true`; if build output is unchanged, both browser suites skip. Detect those paths against `BASE_SHA` and force full checks.</violation>
</file>

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

pages, bundles = {}, {}
for path in sorted(root.rglob("*")):
suffix = path.suffix
if suffix not in {".html", ".css", ".js"} or not path.is_file():

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Only .html, .css and .js are inventoried, so changes to fonts or images with unchanged names are invisible. Such a change yields mode none and skips the design and axe checks. Include other asset types in bundles, or document why they are excluded.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At scripts/rebrand/changed_pages.py, line 30:

<comment>Only `.html`, `.css` and `.js` are inventoried, so changes to fonts or images with unchanged names are invisible. Such a change yields mode `none` and skips the design and axe checks. Include other asset types in `bundles`, or document why they are excluded.</comment>

<file context>
@@ -0,0 +1,92 @@
+    pages, bundles = {}, {}
+    for path in sorted(root.rglob("*")):
+        suffix = path.suffix
+        if suffix not in {".html", ".css", ".js"} or not path.is_file():
+            continue
+        relative = path.relative_to(root).as_posix()
</file context>

total = len(live) + len(diff["removed"])
if diff.get("force_full") or total > 60:
mode = "full"
elif live:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: A mixed change (CSS/JS bundle plus any page change) selects changed, so the core sample is skipped. Site-wide style regressions then go unchecked on pages whose HTML did not change. Run the core sample whenever bundles_changed is true, in addition to the changed pages.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At scripts/rebrand/changed_pages.py, line 60:

<comment>A mixed change (CSS/JS bundle plus any page change) selects `changed`, so the `core` sample is skipped. Site-wide style regressions then go unchecked on pages whose HTML did not change. Run the core sample whenever `bundles_changed` is true, in addition to the changed pages.</comment>

<file context>
@@ -0,0 +1,92 @@
+    total = len(live) + len(diff["removed"])
+    if diff.get("force_full") or total > 60:
+        mode = "full"
+    elif live:
+        mode = "changed"
+    elif diff["bundles_changed"]:
</file context>

url = args.url.rstrip("/") + "/" if args.url else None
failures = []
if public:
if public and mode == "full":

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: These whole-build checks now run only in full mode, so a CSS-only change to icons.css can drop an icon with no failure. They are cheap scans and do not depend on the selected pages. Keep them running whenever a build is given.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At scripts/rebrand/check_design.py, line 1668:

<comment>These whole-build checks now run only in full mode, so a CSS-only change to `icons.css` can drop an icon with no failure. They are cheap scans and do not depend on the selected pages. Keep them running whenever a build is given.</comment>

<file context>
@@ -1601,16 +1651,21 @@ def main():
     url = args.url.rstrip("/") + "/" if args.url else None
     failures = []
-    if public:
+    if public and mode == "full":
         print("Icons")
         check_icons(public, failures)
</file context>
Suggested change
if public and mode == "full":
if public:

known = topics.evaluate("[...document.querySelectorAll('.facet[data-facet=cluster] .chip')].map(c => c.dataset.value)")
expect(wanted and set(wanted) <= set(known), f"every topic button names a real cluster: {sorted(set(wanted) - set(known))}")
topics.context.close()
if selected is None or {"/", "/resources/"} <= selected:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: This cross-page assertion runs only when both / and /resources/ change, while the section is selected only for /resources/; trigger it when either page changes and include both paths in the section selection.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At scripts/rebrand/check_design.py, line 1073:

<comment>This cross-page assertion runs only when both `/` and `/resources/` change, while the section is selected only for `/resources/`; trigger it when either page changes and include both paths in the section selection.</comment>

<file context>
@@ -970,75 +997,87 @@ def look(state, selector="#just-os-bubble", floating=False):
-    known = topics.evaluate("[...document.querySelectorAll('.facet[data-facet=cluster] .chip')].map(c => c.dataset.value)")
-    expect(wanted and set(wanted) <= set(known), f"every topic button names a real cluster: {sorted(set(wanted) - set(known))}")
-    topics.context.close()
+    if selected is None or {"/", "/resources/"} <= selected:
+        topics = new_page(browser, 1440)
+        topics.goto(base, wait_until="load")
</file context>

BASE_SHA: ${{ github.event.pull_request.base.sha }}
FULL_LABEL: ${{ contains(github.event.pull_request.labels.*.name, 'full-checks') }}
run: |
if [ "$EVENT" != pull_request ] || [ "$FULL_LABEL" = true ]; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: PRs changing only this workflow or a check script still set scoped=true; if build output is unchanged, both browser suites skip. Detect those paths against BASE_SHA and force full checks.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At .github/workflows/rebrand-preview.yaml, line 73:

<comment>PRs changing only this workflow or a check script still set `scoped=true`; if build output is unchanged, both browser suites skip. Detect those paths against `BASE_SHA` and force full checks.</comment>

<file context>
@@ -58,6 +63,19 @@ jobs:
+          BASE_SHA: ${{ github.event.pull_request.base.sha }}
+          FULL_LABEL: ${{ contains(github.event.pull_request.labels.*.name, 'full-checks') }}
+        run: |
+          if [ "$EVENT" != pull_request ] || [ "$FULL_LABEL" = true ]; then
+            echo "scoped=false" >> "$GITHUB_OUTPUT"
+          else
</file context>

cases = [
(empty, "none", set()),
({**empty, "bundles_changed": True}, "core", set()),
({**empty, "added": ["/new/"], "removed": ["/old/"]}, "changed", {"/new/"}),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: test_selection never sets a page in changed, so a regression that drops modified pages from the selection would still pass. Add a case with "changed": ["/"] and expect "changed" mode with {"/"}.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At scripts/tests/test_rebrand_changed_pages.py, line 44:

<comment>`test_selection` never sets a page in `changed`, so a regression that drops modified pages from the selection would still pass. Add a case with `"changed": ["/"]` and expect `"changed"` mode with `{"/"}`.</comment>

<file context>
@@ -0,0 +1,53 @@
+        cases = [
+            (empty, "none", set()),
+            ({**empty, "bundles_changed": True}, "core", set()),
+            ({**empty, "added": ["/new/"], "removed": ["/old/"]}, "changed", {"/new/"}),
+            ({**empty, "removed": [f"/{i}/" for i in range(61)]}, "full", set()),
+            ({**empty, "force_full": True}, "full", set()),
</file context>

sample.pop("404", None)
if mode == "changed":
names = {path: name for name, path in sample.items()}
sample = {names.get(path, path): path for path in sorted(pages)}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: The new changed-page branch re-adds /404.html when its HTML changes, which undoes the sample.pop("404", None) exclusion above. Full runs skip that page, so filter it out here as well.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At scripts/rebrand/check_axe.py, line 79:

<comment>The new changed-page branch re-adds `/404.html` when its HTML changes, which undoes the `sample.pop("404", None)` exclusion above. Full runs skip that page, so filter it out here as well.</comment>

<file context>
@@ -57,14 +59,24 @@ def main():
     sample.pop("404", None)
+    if mode == "changed":
+        names = {path: name for name, path in sample.items()}
+        sample = {names.get(path, path): path for path in sorted(pages)}
     with open(args.axe, encoding="utf-8") as handle:
         axe = handle.read()
</file context>
Suggested change
sample = {names.get(path, path): path for path in sorted(pages)}
sample = {names.get(path, path): path for path in sorted(pages) if path != "/404.html"}

@LukasWallrich
LukasWallrich deleted the scratch-rebrand-ci-css branch November 21, 2026 11:45
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.

1 participant