Skip to content

feat: improve restore page UX#22

Merged
KHAEntertainment merged 2 commits intomasterfrom
fix/issue-5-manual
Mar 27, 2026
Merged

feat: improve restore page UX#22
KHAEntertainment merged 2 commits intomasterfrom
fix/issue-5-manual

Conversation

@KHAEntertainment
Copy link
Copy Markdown
Owner

@KHAEntertainment KHAEntertainment commented Mar 22, 2026

Resolves #5. Adds adaptive labels dependent on backup scope and fixes garbled emojis on mobile.

Summary by CodeRabbit

Release Notes

  • Style
    • Updated button labels and icons for restore and restart operations to improve clarity and consistency across different configuration contexts.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 22, 2026

Warning

Rate limit exceeded

@coderabbitai[bot] has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 16 minutes and 2 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 61270ed6-c839-470b-a064-8051e6d1e704

📥 Commits

Reviewing files that changed from the base of the PR and between ec19037 and 6513963.

📒 Files selected for processing (2)
  • pyproject.toml
  • src/ocbs/serve.py

Walkthrough

Updated the restore page button labels in src/ocbs/serve.py to dynamically adapt text based on backup scope and replaced emoji characters with HTML entities for improved mobile device compatibility.

Changes

Cohort / File(s) Summary
Restore Button UI Labels
src/ocbs/serve.py
Added dynamic restore_btn_text variants based on escaped_scope (config, workspace, session scopes). Replaced emoji characters with HTML entities (↻ for restart, ⚠️ for warning icon) to improve mobile rendering. Button labels now adapt to backup scope type.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

✨ Emojis were lost in translation,

HTML entities to the rescue with precision,

Mobile screens now smile with delight,

Where restore buttons glow just right! 🌟

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR addresses emoji rendering fixes and adaptive labeling from issue #5, but lacks staged recovery flow, confirmation dialogs, loading spinners, and estimated restore time functionality specified in requirements. Implement remaining requirements: add "Restart Gateway Only" button, staged recovery flow with all three stages, confirmation dialogs, loading spinners, and verify multi-stage options work across all backup scope scenarios.
✅ 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 accurately summarizes the main change: improving the restore page UX through adaptive labels and fixed emoji rendering, which directly matches the changeset.
Out of Scope Changes check ✅ Passed All changes are directly scoped to restore page UX improvements (emoji rendering and adaptive labels), with no unrelated or out-of-scope modifications detected.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/issue-5-manual

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/ocbs/serve.py`:
- Around line 366-372: The labels were changed (restore_btn_text based on
escaped_scope) but the UI still renders a single restore button; update the
restore rendering to implement staged restore actions: derive separate
stage2_html and stage3_html from the raw scope (not just escaped_scope) so
stage2 uses the config/workspace/session-specific label and stage3 uses the
full-restore label, and conditionally include stage3_html in the template only
when workspace or session data exists (check the same data source used elsewhere
to detect sessions/workspaces). Modify the code that currently emits the single
restore button (the block that uses restore_btn_text) to output two distinct
buttons/controls (Stage 2 and Stage 3) with appropriate names and hooks,
ensuring stage3_html is only inserted when session/workspace data is present.
🪄 Autofix (Beta)

✅ Autofix completed


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d7132bc4-928b-4dc6-b3bc-3aa4178891af

📥 Commits

Reviewing files that changed from the base of the PR and between 34626a9 and ec19037.

📒 Files selected for processing (1)
  • src/ocbs/serve.py

Comment thread src/ocbs/serve.py Outdated
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 26, 2026

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

Fixes Applied Successfully

Fixed 2 file(s) based on 1 unresolved review comment.

Files modified:

  • pyproject.toml
  • src/ocbs/serve.py

Commit: 651396370b16b426ed19ee91ff088db5328d714d

The changes have been pushed to the fix/issue-5-manual branch.

Time taken: 5m 50s

Fixed 2 file(s) based on 1 unresolved review comment.

Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
@KHAEntertainment KHAEntertainment merged commit beea214 into master Mar 27, 2026
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.

Restore Page UX Improvements: Staged Recovery & Emoji Rendering

1 participant