Skip to content

chore: sync workflow templates - #859

Merged
stranske merged 1 commit into
mainfrom
sync/workflows-c45de68fdd89
Jun 23, 2026
Merged

chore: sync workflow templates#859
stranske merged 1 commit into
mainfrom
sync/workflows-c45de68fdd89

Conversation

@stranske

@stranske stranske commented Jun 23, 2026

Copy link
Copy Markdown
Owner

Sync Summary

Files Updated

  • 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.
  • README.md: Design-system usage guide: how to apply the theme + components/kit per app type.

Files Skipped

  • 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: 96021efe31cc7378fd7e3c8d92d4dd8c5b58b440
Template hash: c45de68fdd89
Sync branch: sync/workflows-c45de68fdd89
Consumer repo: stranske/Template
Manifest: .github/sync-manifest.yml

Summary by CodeRabbit

  • Documentation

    • Updated design system README with improved clarity on workflow template management location and explicit instruction to update templates before synchronizing changes to consumer repositories.
  • Refactor

    • Enhanced ID humanization logic to better recognize and appropriately filter UUID-shaped segments, producing clearer and more readable identifiers throughout the system.

Automated sync from stranske/Workflows
Template hash: c45de68fdd89

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

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 339280ac-2ed3-4578-b7b4-a0ea1e770e4a

📥 Commits

Reviewing files that changed from the base of the PR and between 6ed8d25 and 534d31d.

📒 Files selected for processing (2)
  • design-system/README.md
  • design-system/ds_streamlit.py
🔗 Linked repositories identified

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

  • stranske/Workflows (auto-detected)
📜 Recent review details
🧰 Additional context used
📓 Path-based instructions (1)
**/*.py

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

In Manager-Database repository using Prefect 2.x, import schedules from prefect.client.schemas.schedules rather 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: ...r Repos GitHub Actions workflow through .github/sync-manifest.yml. Update the Workflow...

(GITHUB)

🔀 Multi-repo context stranske/Workflows

Based on my exploration of the stranske/Workflows repository, I have gathered comprehensive cross-repository context for this PR.

Linked repositories findings

stranske/Workflows

Source of Changes:
The PR syncs from commit 96021efe31cc7378fd7e3c8d92d4dd8c5b58b440 titled "fix: harden synced design system helper (#2516)" [::stranske/Workflows::]. This is the authoritative source for the synced files.

Sync Configuration:
Both files are managed through .github/sync-manifest.yml under the docs: section and are configured for automatic distribution to all consumer repositories via the Maint 68 Sync Consumer Repos workflow [::stranske/Workflows::]`.

Design System Module Usage:
The ds_streamlit.py module is tested by tests/test_design_system_template.py which validates [::stranske/Workflows::]:

  • Line 18-21: Module can be imported without streamlit being available
  • Line 24-31: humanize_id() correctly filters UUID-shaped segments and hex tokens as opaque

Key Architectural Changes:

  • Dynamic Streamlit Import (lines 61-62): New _streamlit() helper uses import_module() for lazy loading, enabling the module to be imported during static analysis without requiring streamlit as a hard dependency [::stranske/Workflows::].

  • Refactored humanize_id Logic (lines 195-240):

    • Added regex _UUID_RE (line 58) to detect UUID-shaped segments
    • Added _HEX_CHARS constant (line 57) for hex token detection
    • New helper _is_opaque_id_segment() (lines 223-230) treats 8+ hex-only characters and UUID-shaped values as opaque
    • New helper _is_opaque_id_token() (lines 233-240) filters 4-char hex-digit tokens and long hex sequences
    • This improves filtering of internal IDs to reveal meaningful labels [::stranske/Workflows::].

Documentation Update:
The README change clarifies the kit's management location, explicitly referencing stranske/Workflows/templates/consumer-repo/design-system/ and instructing users to "Update the Workflows template first" before the sync replaces consumer copies [::stranske/Workflows::].

Distribution Model:
The sync-manifest.yml indicates these files are synced to all consumer repositories via the centralized sync workflow, making them a fleet-wide standard for Streamlit UI presentation patterns [::stranske/Workflows::].

🔇 Additional comments (2)
design-system/ds_streamlit.py (1)

28-32: LGTM!

Also applies to: 57-68, 100-100, 121-121, 177-177, 209-240

design-system/README.md (1)

50-50: LGTM!


📝 Walkthrough

Walkthrough

ds_streamlit.py is updated to centralize Streamlit importing through a new _streamlit() dynamic-import helper used by all UI helpers. humanize_id's opaque-segment detection is extracted into _is_opaque_id_segment and _is_opaque_id_token using new _HEX_CHARS and _UUID_RE constants. The README doc corrects the template path and update-order instruction.

Changes

ds_streamlit refactor

Layer / File(s) Summary
Centralized _streamlit() dynamic import helper
design-system/ds_streamlit.py, design-system/README.md
Adds re and import_module imports; introduces _streamlit() as a single dynamic-import wrapper; updates inject_theme, empty_state, notice, and diagnostics_expander to call _streamlit() instead of directly importing streamlit. README corrects the template path to stranske/Workflows/templates/consumer-repo/design-system/ and changes the update-order instruction to "Update the Workflows template first."
humanize_id opaque-ID filtering refactor
design-system/ds_streamlit.py
Replaces the prior inline heuristic with _is_opaque_id_segment (empty/UUID rejection via _UUID_RE) and _is_opaque_id_token (hex/digit rejection via _HEX_CHARS); humanize_id now delegates to both helpers before formatting remaining words.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • stranske/Template#856: Also modifies design-system/ds_streamlit.py in overlapping areas, including Streamlit helper usage and humanize_id opaque/meaningful token filtering logic.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title 'chore: sync workflow templates' is partially related to the changeset but does not accurately reflect the main changes, which are substantive code updates to ds_streamlit.py (refactoring Streamlit imports and humanize_id logic) and a documentation clarification in README.md, not primarily a workflow template synchronization. Consider a more specific title that reflects the primary code changes, such as 'refactor: centralize Streamlit imports and improve ID humanization' or 'chore: sync design-system utilities and update documentation'.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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-c45de68fdd89

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

@agents-workflows-bot

agents-workflows-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Automated Status Summary

Head SHA: dfdb501
Latest Runs: ⏳ pending — Gate
Required: core tests (3.12): ⏳ pending, core tests (3.13): ⏳ pending, docker smoke: ⏳ pending, gate: ⏳ pending

Workflow / Job Result Logs
(no jobs reported) ⏳ pending

Coverage Overview

  • Coverage history entries: 1

Coverage Trend

Metric Value
Current 100.00%
Baseline 0.00%
Delta +100.00%
Minimum 70.00%
Status ✅ Pass

Top Coverage Hotspots (lowest coverage)

File Coverage Missing
src/my_project/__init__.py 100.0% 0

Updated automatically; will refresh on subsequent CI/Docker completions.


Keepalive checklist

Scope

No scope information available

Tasks

  • No tasks defined

Acceptance criteria

  • No acceptance criteria defined

@stranske
stranske temporarily deployed to agent-standard June 23, 2026 12:32 — with GitHub Actions Inactive
@stranske
stranske merged commit 2cf5ba5 into main Jun 23, 2026
137 of 151 checks passed
@stranske
stranske deleted the sync/workflows-c45de68fdd89 branch June 23, 2026 12:56
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