Skip to content

chore: sync workflow templates - #1230

Closed
stranske wants to merge 1 commit into
mainfrom
sync/workflows-18397dc5e20f
Closed

chore: sync workflow templates#1230
stranske wants to merge 1 commit into
mainfrom
sync/workflows-18397dc5e20f

Conversation

@stranske

@stranske stranske commented Jun 23, 2026

Copy link
Copy Markdown
Owner

Sync Summary

Files Updated

  • agents-guard.yml: Agents guard - enforces agents workflow protections (Health 45)
  • tokens.css: Design-system theme tokens (theme-air/theme-paper + density axis). Override tokens in an app stylesheet loaded after this; do not fork.
  • components.css: Design-system component layer (.ds): panels/appbar/kpis/tables/fields + presentation-state patterns (.notice, .empty-state, .badge, .skeleton).
  • ds_streamlit.py: Streamlit adapter for the design system (inject_theme/empty_state/notice/error/translate_error/dev_note/availability_badge/humanize_id) so Streamlit apps consume the same presentation patterns.
  • PRESENTATION_PATTERNS.md: The presentation-patterns standard (P1-P6): the rule behind each pattern + per-app-type application + the finding->pattern map from the 2026-06 UX-Review fleet baseline.
  • README.md: Design-system usage guide: how to apply the theme + components/kit per app type.

Files Skipped

  • .github/workflows/pr-00-gate.yml: Maintains a fully custom Gate workflow; never overwrite (replaces the hard-coded custom_gate_repos list in maint-68).
  • ci.yml: File exists and sync_mode is create_only
  • renovate.json: File exists and sync_mode is create_only
  • cross-repo-smoke.yml: File exists and sync_mode is create_only
  • llm_slots.json: None

Review Checklist

  • CI passes with updated workflows
  • No repo-specific customizations were overwritten

Source: stranske/Workflows
Source SHA: de0849c19ac81e04dc4b1ce6f95c6ec53a4db945
Template hash: 18397dc5e20f
Sync branch: sync/workflows-18397dc5e20f
Consumer repo: stranske/Manager-Database
Manifest: .github/sync-manifest.yml

Summary by CodeRabbit

  • New Features

    • Added focus-visible styling for interactive elements (links, buttons, inputs)
    • Added diagnostics expander component for optional UI diagnostics display
    • Extended availability badge with plain text variant option
  • Bug Fixes

    • Improved HTML escaping in UI components for enhanced security
    • Enhanced error matching with case-insensitive string comparison
  • Documentation

    • Refined design system presentation pattern guidance
    • Updated design system distribution workflow and asset documentation
  • Style

    • Added support for reduced-motion animations preference
    • Updated typography font stack defaults

Automated sync from stranske/Workflows
Template hash: 18397dc5e20f

Changes synced from sync-manifest.yml
@stranske stranske added sync Automated sync from Workflows automated Automated sync from Workflows labels Jun 23, 2026
@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Updates the design system by adding CSS focus-visible and reduced-motion rules, adjusting font token ordering, hardening ds_streamlit.py with HTML escaping across rendering helpers, adding a diagnostics_expander context manager, extending availability_badge with a plain flag, and rewriting humanize_id. Also refreshes README.md and PRESENTATION_PATTERNS.md, and bumps the pinned setup-api-client action revision in agents-guard.yml.

Changes

Design System Updates

Layer / File(s) Summary
CSS tokens and component style rules
design-system/tokens.css, design-system/components.css
--font-body fallback stack reordered to start with system-ui; :focus-visible outline added using --accent; prefers-reduced-motion override disables skeleton shimmer and sets static background.
HTML escaping and case-insensitive error matching
design-system/ds_streamlit.py
Imports contextmanager and escape; empty_state(), notice() now escape all interpolated values before rendering HTML; translate_error() lowercases input for case-insensitive substring matching.
New exports: diagnostics_expander, availability_badge plain mode, humanize_id rewrite
design-system/ds_streamlit.py
Adds diagnostics_expander() context manager; extends availability_badge() with plain flag; replaces humanize_id() tail-extraction with segment-based opaque-filter logic via new _human_label_segment() helper.
Design system docs and pattern guide
design-system/README.md, design-system/PRESENTATION_PATTERNS.md
README header updated to "Shared Design System," ds_streamlit.py added to files table, status section rewritten to reference sync-manifest distribution; PRESENTATION_PATTERNS.md spacing refined for P2–P6 and plain=False constraint added for availability badges in trusted HTML containers.

CI Action Pin Bump

Layer / File(s) Summary
agents-guard.yml action pin revision bump
.github/workflows/agents-guard.yml
Pinned commit SHA for stranske/Workflows/.github/actions/setup-api-client updated in both pull_request_target and pull_request workflow trigger paths.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • stranske/Manager-Database#1197: Directly updates the same agents-guard.yml Workflows fallback step pinned SHA for both pull_request_target and pull_request paths.
  • stranske/Manager-Database#1198: Part of the workflow template sync that updates the same setup-api-client action pin in agents-guard.yml.
  • stranske/Manager-Database#1213: Bumps the same pinned stranske/Workflows/.github/actions/setup-api-client commit SHA in the same "Setup API client (Workflows fallback)" step.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore: sync workflow templates' is only partially related to the changeset. While it mentions syncing workflow templates, the PR actually synchronizes 6 files including workflow templates, design system documentation, CSS, and Python code. The title focuses on workflows but ignores the substantial design system updates.
Docstring Coverage ✅ Passed Docstring coverage is 87.50% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sync/workflows-18397dc5e20f

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@design-system/README.md`:
- Line 50: The README.md file at line 50 contains ambiguous wording about where
design system updates should be made. The phrase "Update it here first" is
unclear when read from a consumer repository and could mislead users into
editing the consumer copy instead of the source template. Revise this sentence
to explicitly and clearly state that updates must be made to the source location
at stranske/Workflows/templates/consumer-repo/design-system/ first, before the
sync workflow propagates changes to consumer copies. This clarification will
prevent confusion about the source-of-truth and ownership of the design system
files.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 0f40a6ea-38fc-49fb-9065-4b7ade431551

📥 Commits

Reviewing files that changed from the base of the PR and between a2e3959 and a181a52.

📒 Files selected for processing (6)
  • .github/workflows/agents-guard.yml
  • design-system/PRESENTATION_PATTERNS.md
  • design-system/README.md
  • design-system/components.css
  • design-system/ds_streamlit.py
  • design-system/tokens.css
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • stranske/Workflows (auto-detected)
  • stranske/Template (auto-detected)
📜 Review details
🧰 Additional context used
📓 Path-based instructions (5)
**/.github/workflows/**/!(*.md)

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

For workflow_call reusable workflows, do not use top-level permissions: block as it conflicts with caller permissions (documented in docs/INTEGRATION_GUIDE.md)

Files:

  • .github/workflows/agents-guard.yml
**/.github/workflows/*.{yml,yaml}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

For startup_failure in workflows with zero jobs, check for invalid YAML syntax, invalid permission scopes, top-level permissions block on workflow_call, or circular workflow references

Files:

  • .github/workflows/agents-guard.yml
.github/workflows/*.yml

📄 CodeRabbit inference engine (CLAUDE.md)

.github/workflows/*.yml: In this consumer repository, keep most workflow logic in stranske/Workflows and only carry repo-specific configuration unless explicitly documented as an exception
First-party consumers should reference reusable workflows with @main unless intentionally pinning to an exact commit SHA for a controlled reason

Reference reusable workflows with @main in first-party consumers unless intentionally pinning to an exact commit SHA for a controlled reason

Files:

  • .github/workflows/agents-guard.yml
.github/workflows/agents-*.yml

📄 CodeRabbit inference engine (CLAUDE.md)

Agent workflow files (agents-*.yml) are owned by Workflows; fix issues in stranske/Workflows, not in this consumer repo

Files:

  • .github/workflows/agents-guard.yml
**/*.py

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Manager-Database repository uses Prefect 2.x - import schedules from prefect.client.schemas.schedules

Files:

  • design-system/ds_streamlit.py
🪛 LanguageTool
design-system/README.md

[uncategorized] ~50-~50: The official name of this software platform is spelled with a capital “H”.
Context: ...r Repos GitHub Actions workflow through .github/sync-manifest.yml. Update it here firs...

(GITHUB)

🔀 Multi-repo context stranske/Workflows, stranske/Template

Based on my exploration of the linked repositories, I can now provide my findings:

Linked repositories findings

stranske/Workflows

Design system sync source - contains updated ds_streamlit.py:
The source repository at stranske/Workflows contains the updated design system files at ./templates/consumer-repo/design-system/ that are being synced to consumer repositories. [::stranske/Workflows::]

Updated function signatures with potential breaking changes:

  • availability_badge(label: str)availability_badge(label: str, *, plain: bool = True) — the new parameter is keyword-only with a default value. [::stranske/Workflows::]
  • New function diagnostics_expander(label: str = "Diagnostics", *, expanded: bool = False) added to the API. [::stranske/Workflows::]
  • empty_state(), notice() now HTML-escape all user-facing parameters (icon, title, desc, body, action) to prevent XSS. [::stranske/Workflows::]
  • translate_error() now performs case-insensitive substring matching using .lower() for broader error matching. [::stranske/Workflows::]
  • humanize_id() implementation replaced with new segment-based normalization logic using _human_label_segment() helper. [::stranske/Workflows::]

Sync manifest confirms design-system distribution:
The ./.github/sync-manifest.yml indicates ds_streamlit.py is a distributed design system component synced to all consumer repositories (like Manager-Database) with description: "Streamlit adapter for the design system (inject_theme/empty_state/notice/error/translate_error/dev_note/availability_badge/humanize_id)". [::stranske/Workflows::]

No active usage found in source:
Searches found no active calls to the updated functions in the Workflows repository itself, suggesting these are library functions intended for consumer app usage rather than Workflows-internal usage.

stranske/Template

Contains older version of ds_streamlit.py without recent changes:
The Template repo at ./design-system/ds_streamlit.py shows the previous API state where:

  • availability_badge(label: str) has NO plain parameter and always returns HTML badge markup [::stranske/Template::]
  • notice() docstring states action is "optional markdown" (not escaped) [::stranske/Template::]
  • translate_error() uses case-sensitive substring matching (e.g., "No investable funds" in text) [::stranske/Template::]
  • humanize_id() uses simple "tail" extraction with basic separator replacement [::stranske/Template::]
  • diagnostics_expander() function does not exist [::stranske/Template::]

No direct consumers identified:
No usage of these design-system functions was found in the Template repository itself, indicating Template is primarily a reference/documentation repository rather than an active consumer.


Summary

This is a template sync PR that distributes updated design-system files from source (stranske/Workflows) to the consumer repository (stranske/Manager-Database). The key changes introduce:

  1. Breaking change risk: availability_badge() now has a new plain keyword parameter. Any consumer apps calling it positionally will work (backward compatible), but apps that need to switch between plain-text and HTML rendering must adopt the new parameter.

  2. Security improvements: HTML escaping of user inputs in empty_state() and notice() protects against XSS in consumer apps.

  3. Matching behavior change: translate_error() becomes case-insensitive, which may match exceptions differently than before.

  4. New API surface: diagnostics_expander() is a new addition for P4 (diagnostics) pattern compliance.

The Template repo shows the older API, suggesting this is the first major update to the design system after its initial rollout.

🔇 Additional comments (6)
design-system/tokens.css (1)

29-29: LGTM!

Also applies to: 74-74

design-system/components.css (1)

41-41: LGTM!

Also applies to: 97-99

design-system/ds_streamlit.py (1)

29-30: LGTM!

Also applies to: 93-98, 111-121, 137-149, 165-173, 174-184, 186-211

design-system/README.md (1)

1-1: LGTM!

Also applies to: 41-41

design-system/PRESENTATION_PATTERNS.md (1)

17-24: LGTM!

Also applies to: 33-33, 43-60, 84-84

.github/workflows/agents-guard.yml (1)

114-114: LGTM!

Also applies to: 183-183

Comment thread design-system/README.md
## Status & next step

**STAGED** here in the tracker. Graduates to `Workflows/templates/consumer-repo/design-system/` with a `sync-manifest.yml` entry (`is_directory: true`; base tokens `template_sync: exact`) as a deliberate Workflows PR — see [`../PLAN.md`](../PLAN.md) §3.3. Claude Design imports from the Workflows path once graduated, enabling the prototype-in-Design → land-in-repo round-trip.
This kit is managed from `Workflows/templates/consumer-repo/design-system/` and distributed by the Maint 68 Sync Consumer Repos GitHub Actions workflow through `.github/sync-manifest.yml`. Update it here first, then let the sync workflow replace consumer copies.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Clarify source-of-truth wording to avoid consumer-repo edits

Line 50 says “Update it here first,” which is ambiguous in this consumer repository and can conflict with template ownership. Please explicitly direct updates to stranske/Workflows/templates/consumer-repo/design-system/ first.

Suggested wording
-This kit is managed from `Workflows/templates/consumer-repo/design-system/` and distributed by the Maint 68 Sync Consumer Repos GitHub Actions workflow through `.github/sync-manifest.yml`. Update it here first, then let the sync workflow replace consumer copies.
+This kit is managed from `stranske/Workflows/templates/consumer-repo/design-system/` and distributed by the Maint 68 Sync Consumer Repos GitHub Actions workflow through `.github/sync-manifest.yml`. Update the Workflows template first, then let the sync workflow replace consumer copies.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
This kit is managed from `Workflows/templates/consumer-repo/design-system/` and distributed by the Maint 68 Sync Consumer Repos GitHub Actions workflow through `.github/sync-manifest.yml`. Update it here first, then let the sync workflow replace consumer copies.
This kit is managed from `stranske/Workflows/templates/consumer-repo/design-system/` and distributed by the Maint 68 Sync Consumer Repos GitHub Actions workflow through `.github/sync-manifest.yml`. Update the Workflows template first, then let the sync workflow replace consumer copies.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~50-~50: The official name of this software platform is spelled with a capital “H”.
Context: ...r Repos GitHub Actions workflow through .github/sync-manifest.yml. Update it here firs...

(GITHUB)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@design-system/README.md` at line 50, The README.md file at line 50 contains
ambiguous wording about where design system updates should be made. The phrase
"Update it here first" is unclear when read from a consumer repository and could
mislead users into editing the consumer copy instead of the source template.
Revise this sentence to explicitly and clearly state that updates must be made
to the source location at
stranske/Workflows/templates/consumer-repo/design-system/ first, before the sync
workflow propagates changes to consumer copies. This clarification will prevent
confusion about the source-of-truth and ownership of the design system files.

@stranske

Copy link
Copy Markdown
Owner Author

Closing as superseded by the newer sync workflow templates PR #1232 from wave sync/workflows-c45de68fdd89.

@stranske stranske closed this Jun 23, 2026
@stranske
stranske deleted the sync/workflows-18397dc5e20f branch June 23, 2026 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated Automated sync from Workflows sync Automated sync from Workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant