Skip to content

fix: restore keys when loading generation history - #28

Merged
laceyp99 merged 3 commits into
mainfrom
t3code/fix-history-generation-key-handling
Sep 9, 2026
Merged

laceyp99 merged 3 commits into
mainfrom
t3code/fix-history-generation-key-handling

Conversation

@laceyp99

@laceyp99 laceyp99 commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • restore normalized and enharmonic Core key spellings to one of the 12 visible UI choices when loading generation history
  • preserve the current key and warn without blocking the remaining history load when saved metadata contains an invalid key
  • make the history sidebar and generation cards follow Gradio's light and dark theme colors

Fixes #26

Testing

  • uv run --locked --extra dev ruff format --check . - passed
  • uv run --locked --extra dev ruff check . - passed
  • uv run --locked --extra dev pytest -q - passed (45 passed, 1 platform-specific skip)
  • uv build - passed
  • manually loaded generated black-key and natural-key history entries - passed
  • visually checked the history sidebar in light and dark modes - passed

@laceyp99
laceyp99 marked this pull request as ready for review September 9, 2026 21:26
@laceyp99

laceyp99 commented Sep 9, 2026

Copy link
Copy Markdown
Owner Author

Update summary

  • Addressed the single code-review finding (RC-001): test_history_uses_theme_aware_styles asserted literal CSS substrings inside APP_CSS, coupling the test to implementation strings rather than behavior.
  • Dropped those substring assertions and renamed the test to test_render_history_html_uses_theme_aware_classes, keeping only the render-level class="history-empty" check. A CSS refactor now won't break the test without a user-visible change.
  • No production code changed in this update.

Testing

  • uv run --locked --extra dev ruff format --check . - passed
  • uv run --locked --extra dev ruff check . - passed
  • uv run --locked --extra dev pytest -q - passed (45 passed, 1 platform-specific skip)
  • uv build - passed

@laceyp99 laceyp99 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to merge! This additional commit makes the tests decoupled from the potentially shifting CSS substring values.

@laceyp99
laceyp99 merged commit 844a8fd into main Sep 9, 2026
4 checks passed
@laceyp99
laceyp99 deleted the t3code/fix-history-generation-key-handling branch September 9, 2026 22:12
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.

fix history loading for black-key generations

1 participant