Skip to content

chore: sync workflow templates - #786

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

chore: sync workflow templates#786
stranske wants to merge 1 commit into
mainfrom
sync/workflows-d0d4ad2bdd25

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

  • pr-00-gate.yml: File exists and sync_mode is create_only
  • 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: dfe0854ae9b1ba1c616e4b57fb498f283ea3216f
Template hash: d0d4ad2bdd25
Sync branch: sync/workflows-d0d4ad2bdd25
Consumer repo: stranske/Counter_Risk
Manifest: .github/sync-manifest.yml

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced a shared design system with token-driven theming (Air and Paper themes) and compact density option.
    • Added reusable UI components and presentation patterns with standardized styling and semantics.
  • Documentation

    • Published comprehensive design system guidelines, usage instructions, and component reference documentation.
  • Chores

    • Updated workflow configuration to use a pinned external action version.

Automated sync from stranske/Workflows
Template hash: d0d4ad2bdd25

Changes synced from sync-manifest.yml
@stranske stranske added sync Automated sync from Workflows automated Automated sync from Workflows labels Jun 23, 2026
@stranske
stranske temporarily deployed to agent-standard June 23, 2026 08:28 — with GitHub Actions Inactive
@stranske
stranske temporarily deployed to agent-standard June 23, 2026 08:28 — with GitHub Actions Inactive
@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a new design-system/ directory containing tokens.css (two themes plus a density modifier), components.css (scoped component styles), ds_streamlit.py (nine reusable Streamlit helpers), README.md, and PRESENTATION_PATTERNS.md. Separately, bumps a pinned SHA for the fallback setup-api-client action in .github/workflows/agents-guard.yml.

Changes

Shared Design System

Layer / File(s) Summary
CSS token foundation and README
design-system/tokens.css, design-system/README.md
Defines :root spacing, font, shape, and semantic color tokens; adds .theme-air and .theme-paper theme classes with full color palettes and state semantics; adds .density-compact modifier. README documents class usage, per-app override model, file roles, and sync workflow.
Component layer CSS
design-system/components.css
Adds .ds-scoped styles for typography, panels, KPI cards, grid/table, form controls, button variants (primary/secondary/ghost/danger), and standardized presentation-state components: .notice with four semantic variants, .empty-state, .badge, and .skeleton with prefers-reduced-motion fallback.
Streamlit adapter module
design-system/ds_streamlit.py
Implements inject_theme, empty_state, notice, error, translate_error, dev_note, diagnostics_expander, availability_badge, and humanize_id helpers that render the CSS presentation patterns inside Streamlit via st.markdown with HTML escaping.
Presentation patterns documentation
design-system/PRESENTATION_PATTERNS.md
Defines six presentation patterns (P1–P6), a finding-to-pattern mapping table covering fleet UX findings, a Streamlit design kit responsibilities list, and a rollout sequence with test gates.

CI Workflow Pin Bump

Layer / File(s) Summary
agents-guard fallback action pin
.github/workflows/agents-guard.yml
Updates the fallback stranske/Workflows/.github/actions/setup-api-client SHA pin to 44965d8d784573c119fb63828c05c89256c5f3e1 in both the pull_request_target and pull_request event paths.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • stranske/Counter_Risk#757: Updates the same stranske/Workflows setup-api-client fallback action pin in agents-guard.yml, directly preceding this pin bump.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title 'chore: sync workflow templates' is too vague and fails to reflect the substantial design system additions (tokens.css, components.css, ds_streamlit.py, PRESENTATION_PATTERNS.md, README.md), which represent the primary changes in this changeset. Update the title to something more descriptive like 'chore: sync workflow and add design system assets' or 'chore: add design system (tokens, components, Streamlit adapter) and sync workflows' to accurately convey the main changes.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% 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-d0d4ad2bdd25

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

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Workflow state fingerprint for Keepalive Loop Reporter. Do not edit.

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Workflow state fingerprint for Agents Gate Followups. Do not edit.

@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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
design-system/PRESENTATION_PATTERNS.md (1)

94-106: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Add blank line before heading for consistency.

Missing blank line before the "Rollout sequence" heading at Line 94.

📝 Proposed fix
 Graduate this kit + the CSS into `Workflows/templates/consumer-repo/design-system/` so maint-68 syncs it fleet-wide.
 
 ## Rollout sequence
🤖 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/PRESENTATION_PATTERNS.md` around lines 94 - 106, The "##
Rollout sequence" heading is missing a blank line before it. Add a blank line
immediately before the "## Rollout sequence" heading to maintain consistent
markdown formatting throughout the document.
🤖 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/PRESENTATION_PATTERNS.md`:
- Around line 83-92: Add a blank line before the "## Streamlit design kit"
heading to ensure consistent formatting and spacing with other section headings
in the markdown file. Currently the heading appears immediately after the
previous section without any whitespace separator, which breaks the standard
markdown formatting pattern where headings should be preceded by blank lines for
readability.

---

Outside diff comments:
In `@design-system/PRESENTATION_PATTERNS.md`:
- Around line 94-106: The "## Rollout sequence" heading is missing a blank line
before it. Add a blank line immediately before the "## Rollout sequence" heading
to maintain consistent markdown formatting throughout the document.
🪄 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: c96123b1-bb58-46b1-bc8c-467d95db5668

📥 Commits

Reviewing files that changed from the base of the PR and between 765e4a5 and 6cc7786.

📒 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)
📜 Review details
🧰 Additional context used
📓 Path-based instructions (3)
.github/workflows/**/*.yml

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

.github/workflows/**/*.yml: Do not add top-level permissions: block on workflow_call reusable workflows - this conflicts with caller permissions
Avoid invalid YAML syntax, invalid permission scopes, and circular workflow references when creating GitHub Actions workflows

Files:

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

📄 CodeRabbit inference engine (CLAUDE.md)

Agent workflow files (agents-*.yml) should be fixed in stranske/Workflows, not edited locally in the consumer repository

agents-*.yml workflow files should be fixed in stranske/Workflows, not edited locally in the consumer repo

Files:

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

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

In Manager-Database repository, import Prefect 2.x 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: ...m/and distributed by Maint 68 through.github/sync-manifest.yml`. Update it here firs...

(GITHUB)

🪛 markdownlint-cli2 (0.22.1)
design-system/PRESENTATION_PATTERNS.md

[warning] 83-83: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 94-94: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)

🔀 Multi-repo context stranske/Workflows

Based on my thorough exploration of the stranske/Workflows source repository, I have gathered sufficient cross-repository context to inform the review. Here is my final summary:

Linked Repositories Findings

stranske/Workflows [::stranske/Workflows::]

Source of Truth for Synced Design System & Workflow Templates

The PR synchronizes from the canonical source repository stranske/Workflows (commit dfe0854) which implements a hardened design-system sync with the following key contracts:

1. Design System Files (Canonical, Non-Forkable)

tokens.css [::stranske/Workflows::] — Shared token definitions:

  • Two themes: .theme-air (default, Ink & Air) and .theme-paper (Warm Paper for friendlier apps)
  • Orthogonal .density-compact axis for data-dense screens
  • Contract: Apps may only override tokens via custom CSS loaded after tokens.css, never fork the file

components.css [::stranske/Workflows::] — Scoped component layer:

  • All styles scoped under .ds namespace to prevent leakage into host apps
  • Token-driven and theme-agnostic — reads only CSS variables
  • Includes presentation-state patterns: .notice (variants: --info, --warn, --error, --ok), .empty-state, .badge, .skeleton
  • Contract: Never fork; only override tokens, not component rules

ds_streamlit.py [::stranske/Workflows::] — Streamlit adapter (186 lines):

  • Hardened with HTML escaping on all user-provided strings (html.escape() applied to desc, title, body, action, label, raw parameters)
  • Color palette hardcoded to match .theme-air tokens:
    • _INK = "#0a0a0a", _ACCENT = "#4f46e5", _NEG = "#dc2626", _WARN = "#b45309", _POS = "#047857"
    • Comment explicitly warns: "keep in sync with tokens.css .theme-air"
  • Critical: Mismatch would cause Streamlit UIs to visually diverge from web UIs
  • Functions exported: inject_theme(), empty_state(), notice(), error(), translate_error() (maps known exceptions to human messages), dev_note(), diagnostics_expander(), availability_badge(), humanize_id()
  • Safety contract: translate_error() logs raw exceptions but never displays them; error() must never receive raw exception text

PRESENTATION_PATTERNS.md [::stranske/Workflows::] — Fleet-wide UX standard:

  • 6 reusable presentation patterns (P1–P6) derived from 2026-06-22 cross-fleet UX-Review baseline (8 apps)
  • P1: Light theme default; P2: Empty states with CTA; P3: Translated errors; P4: Dev notices to logs; P5: Feature-availability badges; P6: Humanized IDs
  • Maps specific findings (TMP #5628, Inv-Man-Intake #630, etc.) to adoption of canonical patterns rather than bespoke fixes

README.md [::stranske/Workflows::] — Usage guidance:

  • Emphasizes .ds scope isolation and canonical non-forkable status of components.css
  • Per-app theme mapping: theme-air for work apps (Counter_Risk, Trend, Manager-Database, Inv-Man-Intake, Portable-Alpha, etc.); theme-paper for Reader, LMS
  • Token customization via post-load CSS override, never component modification

2. Workflow & Action Updates

agents-guard.yml [::stranske/Workflows::] — Hardened workflow:

  • Fallback setup-api-client action pinned to 44965d8d784573c119fb63828c05c89256c5f3e1 (from commit dfe0854)
  • Action installs @octokit/rest@20.0.2, @octokit/auth-app@6.0.3, lru-cache@10.4.3 at pinned versions
  • Exports: token_count, available_tokens, setup_contract (machine-readable JSON output per workflows-api-client-setup/v1 schema)

3. Sync Policy & Distribution

maint-68 Sync Workflow [::stranske/Workflows::]:

  • Design system files synced via create_only mode (will NOT overwrite existing consumer copies except those in overwrite_repos list)
  • Only stranske/Template is in the canonical overwrite list for design system files
  • Distributed to all consumer repos at design-system/ directory path

4. Known Contracts & Constraints

  1. Color Palette Contract: ds_streamlit.py hardcoded Ink & Air palette must remain synchronized with tokens.css .theme-air color values
  2. Theme Application: Apps must apply a theme class (.theme-air or .theme-paper) to a root element for CSS scoping and token inheritance to function
  3. No Component Forking: components.css is canonical and must not be customized per-app; only token overrides are permitted
  4. Error Translation: Apps must call translate_error(exc) before passing exception text to error(message, remediation); never display raw exceptions, internal field names, or filenames
  5. HTML Safety: All user-provided strings in Streamlit helpers are escaped; safe for unsafe_allow_html=True rendering
  6. Diagnostic Leakage Prevention: Auth/trace/dev notices must go to logs via dev_note() or behind diagnostics_expander(), never to main UI

Key Risk for Counter_Risk Repository:

  • If the Counter_Risk repo has customized components.css or hardcoded color palettes in any Streamlit app, syncing this canonical version will overwrite those customizations (though create_only mode should prevent this unless explicitly listed in overwrite_repos)
  • The hardening fixes may introduce stricter HTML escaping that could affect string rendering if the app was relying on unescaped HTML
🔇 Additional comments (20)
.github/workflows/agents-guard.yml (1)

114-114: 🎯 Functional Correctness

SHA pinned correctly — action verified in source repository.

Both fallback paths reference a valid commit (44965d8d784573c119fb63828c05c89256c5f3e1) in stranske/Workflows that contains the properly structured action. The sync from the canonical source repository follows the intended workflow and requires no action.

design-system/tokens.css (3)

16-42: LGTM!


44-58: LGTM!


60-76: LGTM!

design-system/README.md (2)

1-34: LGTM!


35-51: LGTM!

design-system/components.css (4)

1-28: LGTM!


29-42: LGTM!


43-55: LGTM!


56-99: LGTM!

design-system/ds_streamlit.py (9)

1-53: LGTM!


56-77: LGTM!


80-106: LGTM!


109-123: LGTM!


126-129: LGTM!


132-157: LGTM!


160-162: LGTM!


165-171: LGTM!


174-186: LGTM!

design-system/PRESENTATION_PATTERNS.md (1)

1-65: LGTM!

Comment on lines +83 to +92
## Streamlit design kit (most of the fleet is Streamlit)
The CSS components above cover the web apps (Pension-Data, trip-planner, LMS). The four Streamlit
Tier-A apps need a Streamlit-native equivalent — ship a shared `ds_streamlit.py` alongside the CSS:
- `inject_theme()` — applies the `theme-air` palette (P1); pairs with `.streamlit/config.toml`.
- `empty_state(title, desc, cta_label=None, on_click=None)` (P2)
- `notice(kind, title, body, action=None)` and `error(message, remediation=None)` + `translate_error(exc)` (P3)
- `dev_note(msg)` → logging; `diagnostics_expander()` (P4)
- `availability_badge(label)` (P5)
- `humanize_id(raw, mapping)` (P6)
Graduate this kit + the CSS into `Workflows/templates/consumer-repo/design-system/` so maint-68 syncs it fleet-wide.

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 | 🔵 Trivial | 💤 Low value

Add blank line before heading for consistency.

Missing blank line before the "Streamlit design kit" heading at Line 83.

📝 Proposed fix
 | Default dark theme (TMP/PA/MD/IMI) | P1 |
 
 ## Streamlit design kit (most of the fleet is Streamlit)
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 83-83: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)

🤖 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/PRESENTATION_PATTERNS.md` around lines 83 - 92, Add a blank
line before the "## Streamlit design kit" heading to ensure consistent
formatting and spacing with other section headings in the markdown file.
Currently the heading appears immediately after the previous section without any
whitespace separator, which breaks the standard markdown formatting pattern
where headings should be preceded by blank lines for readability.

@stranske

Copy link
Copy Markdown
Owner Author

Closing as superseded by newer sync PR #788 from the latest Workflows sync wave.

@stranske stranske closed this Jun 23, 2026
@stranske
stranske deleted the sync/workflows-d0d4ad2bdd25 branch June 23, 2026 12:11
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