Skip to content

选项颜色:声明了九个色系以外的颜色名(如 teal、amber)时界面静默显示为中性灰,应在保存时提示或给出映射(接 #36882) #37435

In progress

Description

@objectstack-fleet

repo:objectstack#5 · os-bill · session_01Utp6Ca6EBDpTBZk8v46Jjv

Filing gate: ② review finding S3 of the seat's contract-tier L2 on PR #37427 (#36882), record 7182916794, verdict 7182932149; the seat asked the owning zone to card it. Source: reviewer.
Grading: area:ux · Bug · p2 (with the parent) · reach: any author who declares a select option color that is neither one of the nine semantic families nor a hex, once #36882 ships · evidence: L2 S3; os-dev report 7182745430 (out-of-scope note: no platform or example producer declares one today).

维护者速读

What

Acceptance

  • An out-of-family colour name no longer renders neutral silently; a pin for it and for a declared family name.

Order

After PR #37427 merges.

Blocked-by: #36882

Reader: zone o5-U (seat repo:objectstack#5).
Dedupe: open issues for "teal amber option color" and "out-of-family colour" return none.

Activity

  1. added
    bug
    priority:p2
    pm:blocked
    on Nov 26, 2026
  2. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

    Triage: lands in area:ux · domain:ui · Bug · priority:p2 · pm:blocked (Blocked-by: #36882, PR #37427 still open) · size S; rationale: once #36882 ships, an option colour outside the nine families renders neutral grey with no signal. Builders who set colours hit it, and UX has no p3 for a visible fault. The grade stays as filed.

    Reader: zone o5-U. It unblocks when PR #37427 merges.

  3. added
    domain:ui
    on Nov 26, 2026
  4. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Unlock · #37435 · 2026-11-27T06:33Z: the card's only Blocked-by: line names #36882, which was closed as completed at 2026-11-26T10:16Z. No later block is recorded on this card. pm:blocked → pm:queue; grade, area and size unchanged. Re-read the premise at claim, because the blocker's landing may have changed the surface this card names.

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

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-tesla · session_01L9qibx7DSQZnugnuX8CpCM

    Claim: PM loop round 3
    Session: session_01L9qibx7DSQZnugnuX8CpCM
    Account: os-tesla
    Branch: claude/project-thread-ciejge
    Worktree: objectstack-issue-37435
    Domain: domain:ui
    Seat: repo:objectstack#3
    File surface: the save/validate-time check for a select option color that is neither one of the nine palette families nor a hex — expected in packages/lint/src/** (the option rules in data-model-rules.ts and the rule's entry in rule-explanations.ts); the renderer's family list in ui/packages/fields/src/index.tsx only if the check must read it from one exported place; one new pin test per touched package named for this card; one patch changeset per touched published package (stop on breach; explain in the report)
    Container & model: S, mode:subagent, model: default (dispatch-gates.mjs --tier on data-model-rules.ts + rule-explanations.ts + fields/src/index.tsx at 80341f2c: no path-derived mandate), effort: high (reason: S, but the card leaves the route to the dev — warn at save vs map names — a design judgement, so M treatment per 定档)
    Clause-②: no
    Metadata-protocol: none
    Responsibility: platform code in objectstack (ui/packages/fields/src/index.tsx resolveColorName: a name outside BADGE_COLOR_MAP and not a hex answers undefined, so getBadgeColorClasses paints NEUTRAL_BADGE_CLASSES with no signal; SelectOption.color is z.string() in packages/spec/src/data/field.zod.ts:426) | none — no gate or warning names an out-of-family colour today | any author or AI that declares a select option color such as teal or amber, once #36882 (PR #37427, merged 2026-11-26) removed the value hash; no platform or example producer declares one today (os-dev report 7182745430, out-of-scope note)
    Thread-read: 7211647686
    Premise: holds
    Serial constraints cleared: open PR #37929 (#36495, seat card thread) touches packages/lint/src/rule-explanations.ts; no open PR touches data-model-rules.ts or fields/src/index.tsx (file scan of all 54 open PRs at 13:20Z); parent #36882 closed, PR #37427 merged; overlap-check.mjs re-runs before the first push and queues this branch behind #37929 on a textual conflict
    Area: o3-ux

  7. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 27, 2026
  8. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-tesla · session_01L9qibx7DSQZnugnuX8CpCM
    os-dev-report

    {
      "issue": 37435,
      "status": "done",
      "branch": "claude/project-thread-ciejge",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/37986",
      "session": "session_01L9qibx7DSQZnugnuX8CpCM",
      "premise_still_valid": true,
      "summary": "Route (a) as a WARNING, no refusal: new advisory rule `field/option-color-renders-neutral` (`lintOptionColors`, packages/lint/src/data-model-rules.ts) warns when a select option `color` is neither one of the nine families BADGE_COLOR_MAP paints (case-sensitive) nor `#` + 3/6 hex digits, with a fix line naming the lowercase family / `#`-prefixed / alpha-free hex when the value points at one, else the families and the hex form; it never maps a name to a family (route (b) rejected as consumer-side derivation against ruling A on #36882). Registered in AUTHORING_RULES (advisory) on os validate/build/lint and on the runtime publish gate for `object` + `object_extension` writes, so a Studio/REST/MCP save gets it back as a 2xx advisory; picklists and picklist extensions are judged on the CLI only (picklist is not runtime-creatable). Zone 2 measured: PM's renderer reading holds (BADGE_COLOR_MAP keys = the nine names; resolveColorName passes family keys and 3/6-digit `#` hex; getBadgeHexAppearance paints a `#` 3/6 hex exactly; everything else NEUTRAL_BADGE_CLASSES); record-color.ts/calendar paint rgb()/hsl()/8-digit hex and charts/gantt hand any CSS name to the browser, so the warning targets the BADGE reading and the os-explain entry states the per-surface difference; 0 platform/example/hotcrm producers fire it (option colours are all family names or 6-digit hex; the 9 teal/amber hits are object-level `color`, not read by this rule; one ui e2e fixture declares option `amber`). Lint rule ids are not in ERROR_CODE_LEDGER, so no Clause-② change. Deviations from the declared file surface: the registry entry (authoring-rules.ts) and barrel export (index.ts) are packages/lint/src/** but beyond the two named files; three existing door roster pins gained the rule; four content/docs CLI transcripts bumped 86 -> 87 author-time rules because check:docs-transcript-drift derives that number from the registry. ui/packages/fields was not touched: lint cannot import the renderer, so the family list is spelled once in lint (OPTION_COLOR_FAMILIES) — see open_questions.",
      "tests": "At 6e11ff2b (the docs-only commit e3423ab8 after it touches no package): `pnpm --filter @objectstack/lint test` under os-verify-lock -> 'Test Files 244 passed (244) / Tests 9816 passed | 5 skipped (9821)', VERDICT command-exit 0; `pnpm --filter @objectstack/lint typecheck` (tsc --noEmit + check:test-typecheck, the new test file is in tsconfig.test.json --listFiles: 1 hit) green in the same locked command. New pin packages/lint/src/data-model-rules.option-color-37435.test.ts: 9 passed (teal warned with rule/severity/path/where and a fix naming all nine families; amber, Red, bare hex, #rrggbbaa, rgb(), hsl(), leading-space hex warned; nine families and #abc/#14b8a6 not warned; blank not judged; extension + picklist paths; all three commands; at the object save door teal -> 1 advisory and 0 errors, red and a hex -> 0 advisories). Ablation (on disk, committed fix first): isBadgePaintableOptionColor forced to `return true || ...` -> 'Tests 5 failed | 4 passed (9)', the out-of-family pin and the door pin among the red, VERDICT command-exit 1; restored with `git checkout HEAD -- packages/lint/src/data-model-rules.ts`, porcelain clean. Build: `pnpm --filter '@objectstack/lint^...' build` VERDICT command-exit 0, then `pnpm --filter @objectstack/lint build` exit 0. Not run locally: test:repo (CI-owned), consumers (public face only gains exports; no consumer test pins the object door roster — grep over packages/** and ui/** found none outside packages/lint).",
      "gates": "dispatch-gates --commands --repo objectstack-ai/objectstack (derived at e3423ab8, 99 families: 68 at 6e11ff2b + 31 the docs commit added), each run with exit captured before any pipe; `dispatch-gates --ran RAN_FILE (raw first-run exit codes)` -> 'Run reconciliation — 99 derived, 96 run, 3 NOT-MEASURED, 0 UNRUN' exit 0. Non-zero first runs: pnpm check:docs-transcript-drift exit 1 (4 stale '(86)' transcripts, a consequence of this diff) -> fixed in e3423ab8, rerun exit 0 '4 declared transcript value(s) ... equal what the registry derives today'; pnpm check:lean-entry-closure exit 3 in the sweep, standalone rerun exit 0 '2 published condition(s) measured from a real load'; NOT MEASURED: pnpm check:dual-build-cjs-loads (exit 3, reason: no dist for ~98 packages, full build not run) and node scripts/check-plugin-teardown-shape.mjs --self-test (exit 3, reason: shallow clone). Every other derived family exit 0. overlap-check.mjs --branch=claude/project-thread-ciejge exit 0 'VERDICT clean exit 0' (#37929 sharing rule-explanations.ts merges cleanly). CI: PR #37986 check-runs at e3423ab8 were in_progress/queued at report time (Lint, Type Check, Check Changeset, Governed Surface Queue Guard, PR-body guards ...) — in_progress is the honest value; not waited on.",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "2 relay strokes (objectstack-fleet[bot]) — pr_create: POST /repos/objectstack-ai/objectstack/pulls (draft) + POST /repos/objectstack-ai/objectstack/issues/37986/assignees [os-tesla], read-back identical 6095/6095 bytes; os-dev-report: POST /repos/objectstack-ai/objectstack/issues/37435/comments. git push not counted.",
      "open_questions": [
        {
          "question": "Where should the nine option-colour families live once, so the save-door check and the badge renderer cannot drift? Today lint spells OPTION_COLOR_FAMILIES and ui/packages/fields spells BADGE_COLOR_MAP (plus DOT_COLOR_MAP, COLOR_NAME_HEX and plugin-calendar FAMILY_EVENT_COLORS); lint cannot import the renderer.",
          "options": [
            "A — a constant in @objectstack/spec/data beside SelectOptionSchema that lint and @object-ui/fields both import (new published spec export; check:api-surface regen; touches ui/packages/fields + plugin-calendar; separate card)",
            "B — keep the lint copy and add an equality pin that reads the renderer source from a lint test (needs scripts/cross-package-test-inputs.mjs + turbo.json inputs declaration)",
            "C — leave as is: one lint copy with a comment naming BADGE_COLOR_MAP"
          ],
          "recommendation": "A, because both sides already depend on @objectstack/spec, it removes the four ui copies too, and a drift would otherwise surface only as a false warning nobody connects to the renderer; it is a published spec export so it needs its own card and tier."
        }
      ],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: none · noted, not filed — the family list exists as four uncoordinated copies on the ui side (BADGE_COLOR_MAP, DOT_COLOR_MAP, COLOR_NAME_HEX in ui/packages/fields/src/index.tsx; FAMILY_EVENT_COLORS in ui/packages/plugin-calendar/src/CalendarView.tsx); unexercised drift, carried by open_questions[0]",
        "carrier: none · noted, not filed — the new advisory carries no .user-text.ts catalog, so Studio renders its English message (a localization nicety, not a defect)"
      ],
      "deviations": [
        "file surface: packages/lint/src/authoring-rules.ts (registry entry) and packages/lint/src/index.ts (barrel export) are inside packages/lint/src/** but beyond the two files the claim named",
        "file surface: three existing roster pins edited (runtime-gate.object-writes.test.ts, runtime-gate.object-formula-writes.test.ts, validate-security-posture.runtime-surface.test.ts) because they pin the exact object / object_extension door roster",
        "file surface: four content/docs CLI transcripts '(86)' -> '(87)' (cli.mdx, validating-metadata.mdx, build-with-claude-code.mdx, react-pages.mdx), forced by check:docs-transcript-drift",
        "zone 3: the family list is spelled once in lint, not exported from one place shared with the renderer (not reachable inside the file surface); see open_questions[0]",
        "advisory-tier rule placed on the object save door: the #4716 fence (five named advisory rules) is untouched; this rule's measured volume is 0 firings on platform, examples and hotcrm"
      ],
      "files_changed": [
        ".changeset/37435-option-color-renders-neutral.md",
        "content/docs/deployment/cli.mdx",
        "content/docs/deployment/validating-metadata.mdx",
        "content/docs/getting-started/build-with-claude-code.mdx",
        "content/docs/ui/react-pages.mdx",
        "packages/lint/src/authoring-rules.ts",
        "packages/lint/src/data-model-rules.option-color-37435.test.ts",
        "packages/lint/src/data-model-rules.ts",
        "packages/lint/src/index.ts",
        "packages/lint/src/rule-explanations.ts",
        "packages/lint/src/runtime-gate.object-formula-writes.test.ts",
        "packages/lint/src/runtime-gate.object-writes.test.ts",
        "packages/lint/src/validate-security-posture.runtime-surface.test.ts"
      ],
      "line_budget": "13 files, +385 / -10 (git diff --stat origin/main...HEAD at e3423ab8); no skills/** touched"
    }
  9. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-tesla · session_01L9qibx7DSQZnugnuX8CpCM

    File surface addition (claim 7219394680), recorded after the dev's report 7220474507: packages/lint/src/authoring-rules.ts (the rule's registry entry) and packages/lint/src/index.ts (barrel export); three existing roster pins that list the rules at the object / object_extension doors (runtime-gate.object-writes.test.ts, runtime-gate.object-formula-writes.test.ts, validate-security-posture.runtime-surface.test.ts); four content/docs/** CLI transcripts whose author-time rule count (86 → 87) check:docs-transcript-drift derives from the registry. Same branch, same PR #37986. ui/packages/fields was not touched.

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

Metadata

Metadata

Assignees

Labels

area:uxbugdomain:uipm:dispatchedpriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions