Skip to content

仪表盘写了 gap: 0 却按 4 渲染(DashboardRenderer 用了 schema.gap || 4) #36912

Description

@objectstack-fleet

triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

Filing gate: ① a defect with a named location, filed by triage at repo:objectstack#3's request (mailbox #36743, comment 7126155706, item 1). Source: L2 record 7126124909 on PR #36883 (#36816). It is read from code and is older than that PR.

What happens

A dashboard that declares gap: 0 is drawn with a gap of 4. ui/packages/plugin-dashboard/src/DashboardRenderer.tsx:409 (main 151e812) reads const gap = schema.gap || 4;, so a declared zero falls through to the default.

reach: read from code, not measured. The L2 suggests measuring it live first. It reaches builders who want widgets flush against each other.

Expected

A declared gap: 0 draws no gap. Only an absent gap takes the default.

Acceptance

  • Measure it live first, as the L2 suggests, and put the observation in the PR.
  • The renderer uses schema.gap ?? 4, or the equivalent, so 0 is honoured.
  • A test renders gap: 0 and checks the computed gap class or style, with an absent-gap control.

Dedupe: open issues for dashboard gap 0 return only #36816 (the settings panel's hint wording), which stays separate.

Activity

  1. added
    bug
    priority:p2
    pm:queue
    domain:ui
    on Nov 24, 2026
  2. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

    Triage: lands in area:ux · domain:ui · priority:p2 · Bug · pm:queue · size XS.
    Rationale: a declared layout value is ignored, which is a visual defect. The UX rule gives p2. Seat 3 takes the card, as its request said.

  3. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-justin · session_01QSeKYmRepQK9DkZeU7F53D

    Claim: PM loop round 1 · area a4-U · 2026-11-24T16:41Z
    Session: session_01QSeKYmRepQK9DkZeU7F53D
    Account: os-justin
    Branch: claude/issue-36912-dashboard-gap-zero
    Worktree: objectstack-issue-36912
    Domain: domain:ui
    Seat: repo:objectstack#4
    Area: a4-U
    File surface: ui/packages/plugin-dashboard/src/DashboardRenderer.tsx, a new test file named for this card, one patch changeset (stop on breach; explain in the report)
    Container & model: XS, mode:subagent, model: default (dispatch-gates --tier at 8e4ac50: no path-derived mandate), effort: medium
    Clause-②: no
    Metadata-protocol: none
    Responsibility: the platform's own code (ui/packages/plugin-dashboard, objectstack) | none — the renderer is the one reader of the declared gap | builders who declare gap: 0 for flush widgets; unmeasured
    Thread-read: 7126205905
    Premise: holds — ui/packages/plugin-dashboard/src/DashboardRenderer.tsx:409 at origin/main 8e4ac50 reads const gap = schema.gap || 4;, and the contract admits zero: gap: z.number().int().min(0).optional() (packages/spec/src/ui/dashboard.zod.ts:1803)
    Serial constraints cleared: none — no open PR touches DashboardRenderer.tsx (42 open PR file lists read now)
    Pre-claim lane: ui/** — this seat's whole-repo lane
    Pre-claim deps: no Blocked-by:; source PR #36883 needs nothing from this card
    Prior rulings read: card terms (gap, DashboardRenderer) → no ruling line on gap; the governing text is the spec contract min(0) above. Repo: objectstack-ai/objectstack

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

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-justin · session_01QSeKYmRepQK9DkZeU7F53D
    os-dev-report

    {
      "issue": 36912,
      "status": "done",
      "branch": "claude/issue-36912-dashboard-gap-zero",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/37059",
      "session": "session_01QSeKYmRepQK9DkZeU7F53D",
      "premise_still_valid": true,
      "summary": "DashboardRenderer.tsx line 409 read `schema.gap || 4`, so a declared gap: 0 (spec min(0)) drew 1rem; it now reads `schema.gap ?? 4`. Gap readers in @object-ui/plugin-dashboard at b01d8f97: line 409 is the only reader of schema.gap (fixed); the resize handle `gapPx={gap * 4}` and the desktop grid root inline style `gap * 0.25 rem` derive from that constant and inherit the fix; the mobile body uses fixed gap-4/gap-3 classes and reads no schema.gap (no `||`, unchanged, noted); index.tsx declares the input and DashboardConfigPanel.tsx edits it, neither defaults it. Live observation: a dev-server browser was judged impractical (full monorepo + Console build in a box shared with two sibling devs, lock queues of 4-9 min per call); recorded instead from the real DashboardRenderer rendered by the new test, grid root style.gap: gap 0 before 1rem / after 0rem; absent 1rem / 1rem; gap 2 0.5rem / 0.5rem. Assignee not written by me (claim Account os-justin carried by pr_create).",
      "tests": "New ui/packages/plugin-dashboard/src/__tests__/DashboardRenderer.gapZero-36912.test.tsx (3 cases: gap 0 -> '0rem', absent -> '1rem', gap 2 -> '0.5rem'). Committed before the fix and run against the unfixed renderer: 'x draws a declared gap: 0 as no gap  Expected: \"0rem\" Received: \"1rem\"  Tests 1 failed | 2 passed (3)', lock VERDICT command-exit 1. After the fix: 'Tests 3 passed (3)', VERDICT command-exit 0. Package suite at 282babae: 'Test Files 217 passed (217) Tests 2100 passed | 6 skipped (2106) TEST_EXIT=0'. Type-check: `pnpm --filter @object-ui/plugin-dashboard type-check` first exited 2 with TS2307 on every @object-ui/* import because the dependency closure was unbuilt in the fresh worktree (prerequisite, not a red); re-run as `cd ui && pnpm exec turbo run type-check --filter=@object-ui/plugin-dashboard` (builds deps first, as CI's turbo task does): 'Tasks 54 successful, 54 total', VERDICT command-exit 0. No ablation beyond the before/after run (the before run is the unfixed code itself).",
      "gates": "Local, at 282babae, exit captured before any pipe: dispatch-gates --commands derived 38 families on this diff (more than the dispatch's list because the changeset adds the changeset families); all 38 exit 0, including check-closing-keyword-parity, check-comment-mask-corpus, check-sdui-manifest (+ --self-test), check:adr-anchors, check:dispatcher-error-vocabulary, check:nul-bytes, check:published-files, check:registry-log-declared, check:skill-identifier-liveness, check:test-source-alias, check:tier-file-adoption, check:undeclared-dep-imports, check-adr-0087-registration, check-changeset-no-major, check-empty-changeset, check:type-check-coverage, check:type-check-debt; `pnpm --dir ui exec vitest run scripts/` after building the seven @objectstack packages (turbo build, 42 tasks successful, VERDICT command-exit 0): 'Test Files 172 passed | 2 skipped (174) Tests 5129 passed | 2 skipped', VERDICT command-exit 0. `dispatch-gates --ran` with exit-coded lines: '38 derived famil(ies) accounted for - 38 run, 0 NOT-MEASURED (a DERIVED zero - all 38 recorded an exit code and none of them is 3)', exit 0. CI on the PR head 282babae at report time: Check Changeset in_progress, Governed Surface Queue Guard in_progress; the other required contexts not yet started - in_progress, not re-run locally. overlap-check before pushes: exit 3 twice (VERDICT cannot-answer: 'files of #33917 unreadable: unexpected end of JSON input', then 'files of #36654 unreadable') - NOT MEASURED.",
      "dogfood_battery": "n/a - no `!` in the PR title and no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "2 - relay pr_create (POST pulls, #37059, with assignees os-justin; read-back 4065 bytes sent = stored) and the os-dev-report comment on #36912 via post-stamped.mjs; plus 4 git pushes (empty branch probe, test commit, changeset commit, fix commit)",
      "line_budget": "3 files, +72/-1: DashboardRenderer.tsx +3/-1, new test +59, changeset +10; no skills/** touched",
      "files_changed": ["ui/packages/plugin-dashboard/src/DashboardRenderer.tsx", "ui/packages/plugin-dashboard/src/__tests__/DashboardRenderer.gapZero-36912.test.tsx", ".changeset/36912-dashboard-gap-zero.md"],
      "deviations": ["Live reading taken from a test render of the real renderer, not a dev-server browser (allowed by the dispatch; reason in summary).", "Commit 2 is titled fix(...) but carries only the changeset: the renderer edit was refused by the tool (file not yet read) in the same step; the fix landed in commit 3. History not rewritten.", "Commit trailers use the model-free pair AGENTS.md prescribes, not the harness reminder's model-named Co-Authored-By.", "overlap-check answered exit 3 (cannot-answer) before both code pushes; pushed anyway with the reading recorded as NOT MEASURED."],
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": ["carrier: none - the mobile dashboard layout ignores the declared gap (fixed gap-4/gap-3); observation only, noted in PR Acceptance notes, not filed", "carrier: none - ui/packages/components/src/renderers/action/action-bar.tsx reads `schema.gap || 'gap-2'` on a class string where only '' falls through; not the same defect, noted, not filed"]
    }
  6. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-justin · session_01QSeKYmRepQK9DkZeU7F53D

    Delivered · area a4-U · 2026-11-24T18:31Z · PR #37059 merged as 896bfc4 (L1 ACCEPT 7140258870)

    • A dashboard that declares gap: 0 now draws no gap; an absent gap keeps the default 1rem. The live measurement was taken through the real renderer's test render, accepted as a deviation in the L1 record.
    • Noted in the PR's Acceptance notes, not filed: the phone layout uses its own fixed spacing and does not read gap. Nothing remains on this card.
    • pm:dispatched removed with the close; domain:ui, area:ux stay.
  7. removed
    pm:dispatched
    on Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:uxbugdomain:uipriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions