Skip to content

chore: sync workflow templates#882

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

chore: sync workflow templates#882
stranske wants to merge 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

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

Summary by CodeRabbit

  • Documentation

    • Updated design-system source location and sync workflow instructions for clarity.
  • Bug Fixes

    • Improved identifier display with better detection of opaque ID formats (UUIDs, hex strings).

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: 539daa59-ed6d-4251-a873-27f711788dd3

📥 Commits

Reviewing files that changed from the base of the PR and between 6f895ba and 899c71e.

📒 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)
  • stranske/Template (auto-detected)
📜 Recent review details
🧰 Additional context used
📓 Path-based instructions (1)
**/*.py

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

In the Manager-Database repository, use Prefect 2.x and 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 the Workflow...

(GITHUB)

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

Looking at the cross-repository context, I can now provide findings about this sync PR.

Linked repositories findings

stranske/Workflows (Source Template)

Design System Sync Configuration:
The sync manifest (/.github/sync-manifest.yml) defines ds_streamlit.py as part of the shared fleet design system [::stranske/Workflows::]:

  • Listed under docs: section with description: "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."
  • Marked with overwrite_repos: [stranske/Template] — Template is explicitly configured to stay byte-aligned with the canonical template.
  • The design system README states it is "managed from stranske/Workflows/templates/consumer-repo/design-system/ and distributed by the Maint 68 Sync Consumer Repos GitHub Actions workflow"

Consumer Applications Affected:
The design-system README lists 11 consumer applications using this shared kit [::stranske/Workflows::]:

  • Trend_Model_Project, Counter_Risk, Manager-Database, Inv-Man-Intake, Pension-Data, Portable-Alpha-Extension-Model, trip-planner, Travel-Plan-Permission (theme-air)
  • Reader, learning-management-system (theme-paper)

stranske/Template (Consumer Repo)

Current ds_streamlit.py Implementation:
The Template repo currently has the older version without the refactored _streamlit() centralization [::stranske/Template::]:

  • Uses direct import streamlit as st inside each function (inject_theme(), empty_state(), etc.)
  • Missing the UUID regex pattern (_UUID_RE) and hex character set (_HEX_CHARS)
  • Missing opaque ID detection helpers (_is_opaque_id_segment(), _is_opaque_id_token())

Backward Compatibility Assessment:
All public function signatures in the PR changes remain identical:

  • inject_theme(), empty_state(), notice(), error(), translate_error(), dev_note(), diagnostics_expander(), availability_badge(), humanize_id() have unchanged signatures
  • No function return types changed
  • No parameters were added to public functions

The changes are internal refactoring and enhancement (lazy Streamlit loading, improved ID humanization logic) rather than API breaking changes. Consumer applications calling these functions will experience no compatibility issues.

🔇 Additional comments (3)
design-system/README.md (1)

50-50: LGTM!

design-system/ds_streamlit.py (2)

28-32: LGTM!

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


209-240: LGTM!


📝 Walkthrough

Walkthrough

ds_streamlit.py centralizes Streamlit importing via a new private _streamlit() helper using import_module, updates four UI functions to use it, and expands opaque ID detection in humanize_id with _UUID_RE, _HEX_CHARS, and new _is_opaque_id_segment/_is_opaque_id_token helpers. The README corrects the design-system kit source path to include a stranske/ prefix.

Changes

ds_streamlit.py: Import Centralization and ID Detection

Layer / File(s) Summary
Centralized _streamlit() helper and UI function updates
design-system/ds_streamlit.py
Adds re, import_module, _HEX_CHARS, and _UUID_RE at module level; introduces _streamlit() using import_module("streamlit"); updates inject_theme(), empty_state(), notice(), and diagnostics_expander() to call _streamlit() instead of per-function import streamlit as st.
Opaque ID segment detection and humanize_id rework
design-system/ds_streamlit.py
Replaces the inline digit/hex heuristic in _human_label_segment with calls to new _is_opaque_id_segment and _is_opaque_id_token helpers that classify segments as opaque using _UUID_RE.fullmatch, _HEX_CHARS subset checks, and digit/length rules.

README path correction

Layer / File(s) Summary
README source path and sync instruction update
design-system/README.md
Updates the kit management path to stranske/Workflows/templates/consumer-repo/design-system/ and rewords the sync step to update the Workflows template first.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 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' accurately describes the main objective of this PR, which is to synchronize workflow templates from a source repository.
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.

@stranske-keepalive stranske-keepalive Bot deleted the sync/workflows-c45de68fdd89 branch June 24, 2026 06:48
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