Skip to content

Fix/seed banner alignment 302 - #333

Merged
smaramwbc merged 1 commit into
smaramwbc:mainfrom
Vignesh-P-C:fix/seed-banner-alignment-302
Aug 9, 2026
Merged

Fix/seed banner alignment 302#333
smaramwbc merged 1 commit into
smaramwbc:mainfrom
Vignesh-P-C:fix/seed-banner-alignment-302

Conversation

@Vignesh-P-C

@Vignesh-P-C Vignesh-P-C commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Description

scripts/seed_demo_subjects.py printed a hand-drawn Unicode box banner with manually space-padded lines. One line (STATEWAVE_BOOTSTRAP_DEMO_PACKS=false) was longer than the fixed border width, so its closing didn't align with the rest of the box in a monospace terminal. This PR replaces the manual banner with a _print_seed_banner() helper that auto-sizes the box to the longest line and pads every line to match, so the borders always align regardless of future wording changes.

Related Issue

Closes #302

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to change)
  • 📚 Documentation update
  • 🔧 Maintenance (refactoring, dependencies, CI, etc.)
  • 🧪 Test improvement

Changes Made

  • Added _print_seed_banner() helper function that computes box width from the longest line and pads every line to match
  • Replaced the manually space-padded banner in main() with a call to _print_seed_banner()
  • Fixed the misaligned closing on the STATEWAVE_BOOTSTRAP_DEMO_PACKS=false line as a side effect of the auto-sizing

Testing

  • Unit tests pass locally
  • Integration tests pass locally
  • Manual testing completed
  • New tests added for new functionality

Test Commands Run

python -m ruff check scripts/seed_demo_subjects.py
python scripts/seed_demo_subjects.py --dry-run

Checklist

  • My code follows the project's coding standards
  • I have performed a self-review of my code
  • I have commented my code where necessary
  • I have updated documentation as needed
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix/feature works
  • All existing tests pass
  • I have checked for breaking changes

Screenshots / Recordings

  ┌───────────────────────────────────────────────────────────────────────┐
  │ NOTE: this seeds the MINIMAL statewave-web hero visualization         │
  │ data (~10 episodes/persona) — NOT the full demo agents.               │
  │ For full demo personas (~44 episodes) use the bundled packs:          │
  │   python -m scripts.bootstrap_demo_packs                              │
  │ (or admin UI → Import demo agent memories). A fresh server            │
  │ auto-imports them on boot unless STATEWAVE_BOOTSTRAP_DEMO_PACKS=false │
  └───────────────────────────────────────────────────────────────────────┘

Additional Notes

No test suite exists for this script (it's a standalone data-seeding utility, not covered by tests/), so verification was manual: ruff check passed, and running with --dry-run confirms all box borders now align correctly, including the previously-overflowing line.

@smaramwbc
smaramwbc force-pushed the fix/seed-banner-alignment-302 branch from 78959fb to 0d59f28 Compare August 9, 2026 09:29
@smaramwbc

Copy link
Copy Markdown
Owner

Thanks — nice fix. Auto-sizing the box to the longest line is the right call; I ran the helper against the real banner text and every border lines up exactly, including the STATEWAVE_BOOTSTRAP_DEMO_PACKS=false line that overflowed before.

One housekeeping thing, done rather than asked: I rebased your branch onto current main (maintainer edits enabled, so I hope that's okay). Your branch still carried the earlier wait_readyz.sh commit from #326 — which has since been merged with slightly reworded comment text — so merging as-is would have clashed with (and partly rolled back) what's on main now. After the rebase this PR is exactly your banner fix, nothing else, and the conflict is gone.

Merging once CI is green. Thanks for closing out #302!

@smaramwbc
smaramwbc merged commit 7980dc4 into smaramwbc:main Aug 9, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: seed_demo_subjects.py box-drawing banner has misaligned line widths

2 participants