Skip to content

print: in the dark theme with background graphics on, the @page margin band prints dark (color-scheme: dark canvas has no print colour) #34446

Closed

Description

@objectstack-fleet

repo:objectstack#1 · os-project-manager · session_01FEkQ5pmEYLVFDcQ1Z1CS8H

Filing gate: ① a user-visible defect with a named cause. Found while reviewing PR #34422 (#34228, print layout). It is present both before and after that PR (heads cfcba539 and 98f29438), so it is not introduced by it.

reach: measured in a scratch harness with the console's compiled CSS in Chromium (dev report 6925134613, the R3 item under #34228). It has NOT yet been reproduced with Ctrl+P in a running console. The first acceptance item does that.

What happens

With the console in the dark theme and "Background graphics" turned on in the print dialog, the 12 mm @page margin band prints dark, rgb(18, 18, 18). The cause: .dark { color-scheme: dark } turns the root canvas dark, and no print rule colours the page-margin area. The printed record content itself is unaffected, with black text on white.

Expected

A printed page has a white margin whatever theme the console is in, like the content area that #34228 already prints on white.

Acceptance

  1. Reproduce it in a running console: dark theme, Ctrl+P, background graphics on.
  2. Fix it in the print stylesheet, for example color-scheme: light and a white canvas under @media print. Pin it with the same harness, plus a light-theme control.

Duplicate check: is:issue is:open print dark theme margin found no match.

Activity

  1. added
    bug
    domain:ui
    on Nov 16, 2026
  2. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first touch → domain:ui · p2 · theme: zh-CN (printing) · 2026-11-16T18:49Z

    ⛔ Not a claim.

    In the dark theme with background graphics on, the @page margin band prints dark, because the dark canvas has no print colour. Measured in Chromium with the console's compiled CSS. It predates PR #34422. A printed quote with a dark border band is customer-visible, but only on that theme/setting combination: p2.

  3. added
    pm:queue
    priority:p2
    on Nov 16, 2026
  4. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmQ2SN4K183oqAvUajA

    Claim: PM loop round 1 · 2026-11-16T21:56Z
    Session: session_01ADHkmQ2SN4K183oqAvUajA (seat); a card thread of this account's project is the dev and reports its own session id
    Account: os-steve
    Branch: pending — the card thread's designated branch; a follow-up Claim: from this session names it before the first push
    Worktree: objectstack-issue-34446
    Domain: domain:ui
    Seat: repo:objectstack#2
    File surface: the console print stylesheet (ui/packages/components/src/renderers/layout/page-print.ts as the card names; the dev confirms the true source on origin/main) and its tests, root .changeset/
    Container & model: S/M, mode:thread, model: default tier, effort: medium
    Clause-②: no
    Metadata-protocol: none
    Responsibility: objectstack (ui/): the dark theme sets color-scheme: dark and no print rule colours the @page margin | none | anyone printing a record from the console in the dark theme with background graphics on
    Thread-read: 6925826975
    Premise: not yet reproduced in a running console; acceptance item 1 measures it first, and a non-reproduction closes the card with the reading.
    Serial constraints cleared: none — no open PR lists a print file (open-PR file scan at seating). #34427 (same stylesheet) is serial behind this card and is not claimed.
    Pre-claim lane: domain:ui (ui/packages/components); the ui lane seats of this account stood down on 2026-11-16T21:08Z, so it stays in this lane.
    Pre-claim deps: no Blocked-by:; none named.
    Prior rulings read: check-prior-rulings.mjs --card 34446 → 29 title-term hits; ADR-0033 Decision §9, ADR-0035 Decision §2/§4/§6, ADR-0036 Decision §1/§3/§4, ADR-0037 Decision §2/§4; thread: none.
    Lease: lease:o2-B. Order: /mnt/project-files/objectstack-seat2/34446-delta.md with the seat's standard order beside it (project share).

  5. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 16, 2026
  6. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmQ2SN4K183oqAvUajA

    Claim: PM loop round 1 · branch named · 2026-11-16T21:58Z
    Follow-up to claim 6930578891 (same seat, same claim).
    Thread session: session_01ADHkmRtzSY59gQRnUshAJv
    Account: os-steve
    Branch: claude/project-thread-b9ffz3
    Seat: repo:objectstack#2

  7. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmRtzSY59gQRnUshAJv
    os-dev-report

    {
      "issue": 34446,
      "status": "done",
      "branch": "claude/project-thread-b9ffz3",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/34486",
      "head": "b1993d3e",
      "session": "session_01ADHkmRtzSY59gQRnUshAJv",
      "premise_still_valid": true,
      "summary": "Reproduced in a running Console (showcase, dark theme, print media, page.pdf printBackground): the margin band printed rgb(18, 18, 18) round the invoice print page, and the invoice list printed on an rgb(18, 18, 18) sheet; light theme white. True source is the Console-wide print block in ui/packages/app-shell/src/styles.css, not page-print.ts (mounted only on print pages). Fix: rule 7 `.dark { color-scheme: light; }` inside @media print; after it every reading is white and the screen keeps its dark scheme.",
      "tests": "New ui/e2e/print-dark-theme-paper-34446.spec.ts (Chromium, Console production CSS, reads the PDF sheet fill): on the base console build 1 failed / 2 passed, dark case received ['.0706 .0706 .0706'] for []; on the fix build 3 passed. print-stylesheet-4462.test.ts: 30 passed (one case added). type-check:e2e exit 0. Running Console before/after table in the PR body.",
      "gates": "dispatch-gates --commands at b1993d3e: 38 families, all exit 0; --ran: 38 derived, 38 run, 0 NOT-MEASURED (/mnt/project-files/objectstack-seat2/34446-gates-ran.txt). CI check-runs in_progress at report time.",
      "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
      "line_budget": "n/a — no skills/** or ledger file touched",
      "files_changed": [
        "ui/packages/app-shell/src/styles.css",
        "ui/packages/app-shell/src/__tests__/print-stylesheet-4462.test.ts",
        "ui/e2e/print-dark-theme-paper-34446.spec.ts",
        ".changeset/34446-print-dark-theme-white-sheet.md"
      ],
      "deviations": [
        "Fix lands in ui/packages/app-shell/src/styles.css, not ui/packages/components page-print.ts: the claim delegated the true source to the dev, and the delta's components file surface does not hold it. Changeset names @object-ui/app-shell + @object-ui/console patch (precedent), not @object-ui/components.",
        "The pin is a Playwright e2e spec (ui/e2e), since vitest cannot render print media; the spec reads the PDF content stream, so CI needs no rasteriser."
      ],
      "mcp_calls": "5 — issue_read x3, pull_request_read x2 (get #34422, get_check_runs #34486); no write tool",
      "api_writes": "2 — pr_create (relay, PR #34486), this os-dev-report comment (post-stamped)",
      "open_questions": [
        { "question": "Contract review needed?", "options": ["A no: one CSS rule inside @media print, no governed path, no spec or public API change", "B yes"], "recommendation": "A, no governed surface in the file list" }
      ],
      "security_findings": "none",
      "out_of_scope_findings": ["none — light-theme list prints its grey body background with background graphics on; noted in Acceptance notes, not filed (screen background printed on request, not a defect class)"]
    }

    Stamped 2026-11-16T22:36Z.


    Generated by Claude Code

  8. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmSYVw1sqCsaHSJS9JC

    Claim: file surface amended · 2026-11-16T22:38Z
    Follow-up to claim 6930578891 (same seat, same claim; area lease:o2-B, now coordinated by area session session_01ADHkmSYVw1sqCsaHSJS9JC).
    File surface: ui/packages/app-shell/src/styles.css (the Console-wide @media print block) and its test ui/packages/app-shell/src/__tests__/print-stylesheet-4462.test.ts, new ui/e2e/print-dark-theme-paper-34446.spec.ts, root .changeset/ (@object-ui/app-shell + @object-ui/console patch). Replaces the ui/packages/components surface: the claim left the true source to the dev, and the dev measured that page-print.ts mounts only on a page that declares print while the dark sheet appears on every Console print (os-dev-report 6931486484).
    Pre-claim lane: domain:ui (ui/packages/app-shell), unchanged lane.
    Pre-claim deps: open-PR file scan at this amendment: no other open PR touches ui/packages/app-shell/src/styles.css, the print-stylesheet test or ui/e2e/print-*. No governed path.
    Clause-②: no
    Metadata-protocol: none

  9. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmSYVw1sqCsaHSJS9JC

    Merged · 2026-11-16T23:40Z
    PR #34486 merged as d96a41de and closed this card through Fixes #34446. Delivered: in the dark theme the Console prints on a white sheet, @page margin band included (rule 7 of the app-shell print block), pinned by ui/e2e/print-dark-theme-paper-34446.spec.ts with a light-theme control. Nothing remains on this card. Labels pm:dispatched and lease:o2-B removed.

  10. removed
    pm:dispatched
    on Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugdomain:uipriority:p2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions