chore: sync workflow templates - #855
Conversation
Automated sync from stranske/Workflows Template hash: d0d4ad2bdd25 Changes synced from sync-manifest.yml
📝 WalkthroughWalkthroughThe PR updates the design system's CSS with focus-visible outlines and reduced-motion skeleton support, bumps font token ordering in ChangesDesign System Updates
CI Workflow Action Pin Bump
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Automated Status SummaryHead SHA: b810ebe
Coverage Overview
Coverage Trend
Top Coverage Hotspots (lowest coverage)
Updated automatically; will refresh on subsequent CI/Docker completions. Keepalive checklistScopeNo scope information available Tasks
Acceptance criteria
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 @.github/workflows/agents-guard.yml:
- Line 114: Update the SHA reference for the setup-api-client action in both
fallback steps of the agents-guard workflow. Currently, both the fallback step
at line 114 and the fallback step at line 183 reference the outdated SHA
44965d8d784573c119fb63828c05c89256c5f3e1. Replace this SHA with the correct
synced version dfe0854ae9b1ba1c616e4b57fb498f283ea3216f in both occurrences
where the stranske/Workflows/.github/actions/setup-api-client action is used to
ensure the workflow applies the intended action bump in both event paths.
In `@design-system/ds_streamlit.py`:
- Around line 174-185: The functions availability_badge() and humanize_id() have
changed their output behavior in ways that break backward compatibility for
existing consumers of this shared module. For availability_badge(), add an
optional parameter to control whether HTML formatting is used (defaulting to the
original HTML format). For humanize_id(), add an optional parameter to control
segment selection behavior (defaulting to the original first-segment behavior).
This way, existing callers continue to work unchanged while new code can opt
into the updated behavior by passing the new parameter values.
🪄 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: ee6fb026-2be6-420f-a029-0c64a28ea001
📒 Files selected for processing (6)
.github/workflows/agents-guard.ymldesign-system/PRESENTATION_PATTERNS.mddesign-system/README.mddesign-system/components.cssdesign-system/ds_streamlit.pydesign-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 (5)
.github/workflows/**/*.{yml,yaml}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
.github/workflows/**/*.{yml,yaml}: Ensure coverage threshold settings in GitHub Actions workflow files forcoverage-minmatch the[tool.coverage.report] fail_undersetting inpyproject.toml, as the lower value will be the effective threshold
Forstartup_failurein GitHub Actions workflows with zero jobs, check for invalid YAML syntax, top-levelpermissions:blocks inworkflow_callreusable workflows (which conflicts with caller permissions), invalid permission scopes, or circular workflow references
Files:
.github/workflows/agents-guard.yml
.github/workflows/*.yml
📄 CodeRabbit inference engine (CLAUDE.md)
Reference reusable workflows with
@mainunless intentionally pinning to an exact commit SHA for a controlled reason
Files:
.github/workflows/agents-guard.yml
.github/workflows/**/*.yml
📄 CodeRabbit inference engine (AGENTS.md)
First-party consumers should reference reusable workflows with
@mainunless intentionally pinning to an exact commit SHA for a controlled reason
Files:
.github/workflows/agents-guard.yml
.github/workflows/agents-*.yml
📄 CodeRabbit inference engine (AGENTS.md)
Agent workflows (
agents-*.yml), autofix.yml, synced prompts in.github/codex/, and synced scripts/docs should be fixed in stranske/Workflows, not in the consumer repository
Files:
.github/workflows/agents-guard.yml
**/*.py
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
In Manager-Database repository using Prefect 2.x, import schedules from
prefect.client.schemas.schedulesrather than other locations
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)
🔀 Multi-repo context stranske/Workflows
Linked repositories findings
stranske/Workflows
Setup API Client Action Update [::stranske/Workflows::]
.github/actions/setup-api-client/action.yml— The PR updates the fallback pin in consumer workflows from commit44965d8d784573c119fb63828c05c89256c5f3e1todfe0854ae9b1ba1c616e4b57fb498f283ea3216f(referenced in the git log as "fix: harden synced design system helpers#2511")- The action provides comprehensive API client setup with:
- Support for multiple token types (PATs, GitHub App credentials)
- Token load balancer exports to environment
- npm
@octokitdependency installation with retry logic - Machine-readable setup contract JSON output
- The action signature and outputs remain backward-compatible; the update is to the pinned version
Design System Breaking Changes Synced to Consumers [::stranske/Workflows::]
The PR syncs design system files from commit dfe0854ae9b1ba1c616e4b57fb498f283ea3216f that contain breaking API changes for Streamlit applications:
-
availability_badge()return type change —design-system/ds_streamlit.py- Changed from:
"<span class='badge'>Active</span>"(HTML element) - Changed to:
" · Active"(plain text) - Impact: Consumer Streamlit apps rendering this with
unsafe_allow_html=Truewill display unstyled plain text instead of a styled badge - Applications using this function will require updates to handle the new plain text format
- Changed from:
-
humanize_id()segment extraction logic change —design-system/ds_streamlit.py- Changed from: Extracts first segment before colon (e.g.,
"user:12345:admin"→"user") - Changed to: Extracts last segment after colon (e.g.,
"user:12345:admin"→"admin") - Impact: Any Streamlit app using this function for ID display will show different (likely more granular) output
- Changed from: Extracts first segment before colon (e.g.,
-
New function:
diagnostics_expander()—design-system/ds_streamlit.py- Adds context manager:
diagnostics_expander(label: str = "Diagnostics", *, expanded: bool = False) - Non-breaking; purely additive for collapsible diagnostics panels
- Adds context manager:
-
HTML escaping security enhancement —
design-system/ds_streamlit.pyempty_state()andnotice()now escape user-provided strings before HTML rendering- Uses
escape()from html module - Non-breaking security improvement; prevents HTML/script injection from user input
-
Error handling case-insensitivity —
design-system/ds_streamlit.pytranslate_error()now lowercases input and performs case-insensitive matching- Non-breaking improvement in robustness
CSS Accessibility Additions [::stranske/Workflows::]
design-system/components.cssanddesign-system/tokens.css— Add:focus-visibleoutlines for keyboard navigation and@media (prefers-reduced-motion: reduce)rules for animation accessibility- These are non-breaking enhancements
- Font stack updated in
tokens.csswith explicitsans-seriffallback
Design System Sync Configuration [::stranske/Workflows::]
.github/sync-manifest.yml— The manifest defines design-system asmode: update, meaning consumer repos will have their copies overwritten during sync- The breaking changes in
ds_streamlit.pyand the function signature changes will propagate to all synced consumer repositories, requiring any apps using these functions to be updated
Documentation Updates [::stranske/Workflows::]
design-system/PRESENTATION_PATTERNS.md— Updated with the presentation patterns standard (P1-P6) defining when and how to apply design-system patterns across the fleetdesign-system/README.md— Updated to clarify that the design system is now managed from Workflows and distributed via maint-68 sync
🔇 Additional comments (5)
design-system/README.md (1)
1-1: LGTM!The heading update (line 1), Files table entries (line 41), and status description (line 50) are all accurate and aligned with the upstream Workflows/templates/consumer-repo contract. The reference to
.github/sync-manifest.ymlcorrectly reflects the distribution mechanism documented in the PR objectives.Also applies to: 41-41, 50-50
design-system/PRESENTATION_PATTERNS.md (1)
17-24: LGTM!The formatting changes (blank lines and heading reflow) improve visual hierarchy and readability without altering substantive content. All pattern rules, fixes, and function signatures remain accurate and consistent with the referenced
ds_streamlit.pyhelpers.Also applies to: 33-33, 43-51, 60-60
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-99, 115-121, 137-149, 165-171
| steps.eligibility.outputs.should-run == 'true' && | ||
| steps.api_client_base.outputs.available != 'true' | ||
| uses: "stranske/Workflows/.github/actions/setup-api-client@62ed0a86b5d57062ac3d04f4519e3998858e2d96" # v1 | ||
| uses: "stranske/Workflows/.github/actions/setup-api-client@44965d8d784573c119fb63828c05c89256c5f3e1" # v1 |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Update both fallback action pins to the synced SHA.
Both fallback steps still reference 44965d8d784573c119fb63828c05c89256c5f3e1, but this sync is expected to use dfe0854ae9b1ba1c616e4b57fb498f283ea3216f. As written, the workflow does not apply the intended action bump in either event path.
Suggested patch
- uses: "stranske/Workflows/.github/actions/setup-api-client@44965d8d784573c119fb63828c05c89256c5f3e1" # v1
+ uses: "stranske/Workflows/.github/actions/setup-api-client@dfe0854ae9b1ba1c616e4b57fb498f283ea3216f" # v1
...
- uses: "stranske/Workflows/.github/actions/setup-api-client@44965d8d784573c119fb63828c05c89256c5f3e1" # v1
+ uses: "stranske/Workflows/.github/actions/setup-api-client@dfe0854ae9b1ba1c616e4b57fb498f283ea3216f" # v1Also applies to: 183-183
🤖 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 @.github/workflows/agents-guard.yml at line 114, Update the SHA reference for
the setup-api-client action in both fallback steps of the agents-guard workflow.
Currently, both the fallback step at line 114 and the fallback step at line 183
reference the outdated SHA 44965d8d784573c119fb63828c05c89256c5f3e1. Replace
this SHA with the correct synced version
dfe0854ae9b1ba1c616e4b57fb498f283ea3216f in both occurrences where the
stranske/Workflows/.github/actions/setup-api-client action is used to ensure the
workflow applies the intended action bump in both event paths.
Source: Linked repositories
| def availability_badge(label: str) -> str: | ||
| """P5 — markup for a small availability marker (use in a tab title/caption), | ||
| """P5 — plain Streamlit-safe availability marker for tab titles/captions, | ||
| e.g. tab label f"Export {availability_badge('multi-period only')}".""" | ||
| return f"<span class='ds-badge'>{label}</span>" | ||
| return f" · {str(label).strip()}" | ||
|
|
||
|
|
||
| def humanize_id(raw: str, mapping: Mapping[str, str] | None = None) -> str: | ||
| """P6 — decode an internal id to a human label; never show raw keys.""" | ||
| if mapping and raw in mapping: | ||
| return mapping[raw] | ||
| # Best-effort: take a trailing human-ish segment, strip hashes. | ||
| tail = str(raw).replace("_", " ").split(":")[0].strip() | ||
| tail = str(raw).replace("_", " ").split(":")[-1].strip() |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Preserve backward compatibility for exported helper behavior.
availability_badge() (HTML → plain text) and humanize_id() (first-segment → last-segment) both change public output contracts. In this synced shared module, that is a high-risk integration break for existing consumers expecting prior behavior. Keep old defaults and make new behavior opt-in (or introduce new helper names) to avoid downstream UI regressions.
Proposed compatibility-oriented patch
def availability_badge(label: str) -> str:
- """P5 — plain Streamlit-safe availability marker for tab titles/captions,
- e.g. tab label f"Export {availability_badge('multi-period only')}"."""
- return f" · {str(label).strip()}"
+ """P5 — availability marker.
+ Backward-compatible default returns styled HTML; plain text is opt-in."""
+ normalized = str(label).strip()
+ return f"<span class='ds-badge'>{escape(normalized)}</span>"
-def humanize_id(raw: str, mapping: Mapping[str, str] | None = None) -> str:
+def humanize_id(
+ raw: str,
+ mapping: Mapping[str, str] | None = None,
+ *,
+ use_trailing_segment: bool = False,
+) -> str:
"""P6 — decode an internal id to a human label; never show raw keys."""
if mapping and raw in mapping:
return mapping[raw]
- # Best-effort: take a trailing human-ish segment, strip hashes.
- tail = str(raw).replace("_", " ").split(":")[-1].strip()
+ # Backward-compatible default keeps first segment unless explicitly overridden.
+ parts = str(raw).replace("_", " ").split(":")
+ tail = (parts[-1] if use_trailing_segment else parts[0]).strip()
return tail or "item"🤖 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/ds_streamlit.py` around lines 174 - 185, The functions
availability_badge() and humanize_id() have changed their output behavior in
ways that break backward compatibility for existing consumers of this shared
module. For availability_badge(), add an optional parameter to control whether
HTML formatting is used (defaulting to the original HTML format). For
humanize_id(), add an optional parameter to control segment selection behavior
(defaulting to the original first-segment behavior). This way, existing callers
continue to work unchanged while new code can opt into the updated behavior by
passing the new parameter values.
Source: Linked repositories
|
Closing as superseded by newer sync PR #856 from the latest Workflows sync wave. |
Sync Summary
Files Updated
Files Skipped
Review Checklist
Source: stranske/Workflows
Source SHA:
dfe0854ae9b1ba1c616e4b57fb498f283ea3216fTemplate hash:
d0d4ad2bdd25Sync branch:
sync/workflows-d0d4ad2bdd25Consumer repo:
stranske/TemplateManifest:
.github/sync-manifest.ymlSummary by CodeRabbit
Accessibility Improvements
UI/UX Enhancements
Security