Skip to content

chore(templates): 9.9.1 cleanup β€” dead flags, seed validations, dashboard captions - #65

Merged
os-zhuang merged 1 commit into
mainfrom
chore/9.9.1-cleanup
Jun 18, 2026
Merged

os-zhuang merged 1 commit into
mainfrom
chore/9.9.1-cleanup

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Follow-up to the 9.9.1 upgrade (#64). Three template-side improvements surfaced by booting the all env and browser-verifying every app. 54 files, βˆ’99 net lines.

1 Β· Remove dead enable.* object flags (112 across all 9 templates)

9.9.1 added a liveness-dead-property lint: object-level enable.trackHistory / files / feeds / activities are no-ops. History is per-field (Field.trackHistory, plugin-audit / ADR-0052); comments/attachments/activities live on the sys_* objects. Removed the flags and corrected the stale JSDoc/description lines that referenced them. Build now emits zero warnings (was ~112).

2 Β· Fix seed-validation failures that aborted records at boot

9.9.x now evaluates field == null script rules on insert (previously skipped when the field was omitted). Two rules require an optional sys_user lookup that seed/import/automation paths can't populate β€” reference seeds resolve by natural-key string and there's no seed-time user to point at (the admin is minted post-boot via better-auth; SeedFieldValue constrains lookups to string | null, and the loader silently drops a cel expression):

  • compliance_assessment.completed_requires_assessor
  • content_piece.in_review_requires_assignee

Both downgraded error β†’ warning (fields are optional; stays a UI data-quality signal without hard-blocking inserts). Fixes 4 rejected compliance assessments + 2 content pieces (+ 2 CTAs that cascaded off the dropped pieces).

Verified: compliance_assessment 5, content_piece 14, content_cta 14; fresh boot logs zero ERROR lines (was ~8 seed ValidationErrors).

3 Β· Humanize dashboard KPI captions

Dataset measures used the raw alias as their label (control_count, sum_total_value, task_count), which the metric widgets render as the caption under the number. Gave every measure a readable label across all datasets.

before after
control_count Controls
sum_total_value Total Value
task_count Tasks

Verification

Browser-checked all 9 apps logged in as admin@objectos.ai: boots clean, captions read e.g. "Controls" / "Total Value" (verified compliance + contracts dashboards), previously-rejected records present.

Deliberately left alone (documented, not defects)

  • Todo "My Work" empty for admin β€” it's a personal dashboard filtered to {current_user_id}; seeds cannot assign the human admin (no seed-time user reference). The 16 tasks show in All Tasks / Task Board. Correct by design.
  • Compliance "Assessments Completed by Month" β†’ "No rows" β€” the data now exists and the analytics cube returns the 4 completed assessments, but the dashboard time-series query renders empty. Pre-existing analytics date-bucketing/token behavior, not template-fixable here.

πŸ€– Generated with Claude Code

…oard captions

Follow-up to the 9.9.1 upgrade (#64). Three template-side improvements
surfaced by booting the `all` env and verifying every app in the browser.

1. Remove dead `enable.*` object flags (112 across all 9 templates).
   9.9.1 added a `liveness-dead-property` lint: object-level
   `enable.trackHistory|files|feeds|activities` are no-ops. History is
   per-field (`Field.trackHistory`, plugin-audit / ADR-0052); comments,
   attachments and activities live on the `sys_*` objects. Stale JSDoc/
   description references updated to match. Build now emits zero warnings.

2. Fix seed-validation failures that aborted records at boot.
   9.9.x now evaluates `field == null` script rules on insert (previously
   skipped when the field was omitted). Two rules require an OPTIONAL
   sys_user lookup that seed/import/automation paths cannot populate β€”
   reference seeds resolve by natural-key string and there is no seed-time
   user to point at (the admin is minted post-boot via better-auth):
     - compliance_assessment.completed_requires_assessor
     - content_piece.in_review_requires_assignee
   Both downgraded error β†’ warning (the fields are optional; this stays a
   UI data-quality signal without hard-blocking inserts). Fixes 4 rejected
   compliance assessments + 2 content pieces (and 2 CTAs that cascaded off
   the dropped pieces). Verified: compliance_assessment 5, content_piece 14,
   content_cta 14; fresh boot logs zero ERROR lines.

3. Humanize dashboard KPI captions. Dataset measures used the raw alias as
   their label (`control_count`, `sum_total_value`, `task_count`), which the
   metric widgets render as the caption under the number. Gave every measure
   a readable label (Controls, Total Value, Tasks, …) across all datasets.

Verified in the browser across all 9 apps (login admin@objectos.ai): boots
clean, captions read e.g. "Controls"/"Total Value", previously-rejected
records present.

Note: todo's "My Work" dashboard is empty for the admin BY DESIGN β€” it is a
personal dashboard filtered to `{current_user_id}`, and seeds cannot assign
the human admin (no seed-time user reference). Left unchanged. The compliance
"Assessments Completed by Month" chart still renders "No rows" despite the
data now existing and the cube returning it β€” a pre-existing analytics
time-series/date-bucketing behavior, not template-fixable here.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@os-zhuang
os-zhuang merged commit 4ffba69 into main Jun 18, 2026
3 checks passed
@os-zhuang
os-zhuang deleted the chore/9.9.1-cleanup branch June 18, 2026 05:25
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