Skip to content

Improve booru UI/UX#85

Merged
icceey merged 3 commits intomasterfrom
fix-interval
Apr 26, 2026
Merged

Improve booru UI/UX#85
icceey merged 3 commits intomasterfrom
fix-interval

Conversation

@icceey
Copy link
Copy Markdown
Owner

@icceey icceey commented Apr 26, 2026

This pull request refactors and improves the handling of interval-based booru subscriptions, particularly standardizing interval key formats, tightening validation, and simplifying related logic. It also enhances the display of booru subscription information and adds/updates tests for new behaviors.

Interval Key Handling and Validation:

  • Standardized interval representation for booru ranking subscriptions to use a strict canonical key format (e.g., "3600s") instead of ISO8601 (e.g., "PT1H"), affecting both parsing and serialization in BooruTaskKey and related handler logic. Validation now rejects ambiguous or invalid formats (e.g., "1h", "60m", "0s"). [1] [2] [3] [4] [5] [6] [7] [8]

  • Refactored the subscription handler to use the new interval key functions and updated user-facing messages and internal logic to reflect the new format. [1] [2] [3] [4] [5] [6] [7] [8]

Internal Key Parsing and Subscription Logic:

  • Added the parse_bunsub_internal_key function to distinguish between internal and user-facing subscription keys, improving the ability to handle edge cases and unsubscriptions. [1] [2] [3]

Display and Listing Improvements:

  • Centralized and improved the display logic for booru subscriptions in lists, including more accurate emoji and label selection and handling of ranking/interval types. [1] [2] [3]

Testing Enhancements:

  • Added and updated tests to cover new interval key parsing, validation, and internal key handling, ensuring correct behavior and edge case rejection. [1] [2] [3] [4]

Code Cleanup:

  • Removed obsolete comments and unused imports related to the old ISO8601 duration handling. [1] [2]

These changes collectively make interval subscription handling more robust, user-friendly, and maintainable.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dc8a4301bc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/db/types/booru_task_key.rs
@icceey icceey merged commit 66a13c8 into master Apr 26, 2026
1 check passed
@icceey icceey deleted the fix-interval branch April 26, 2026 05:55
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.

1 participant