Skip to content

[Web Import] Web import error Banners#999

Merged
t-regbs merged 3 commits into
mainfrom
feature/idea/web-import-error-states
May 11, 2026
Merged

[Web Import] Web import error Banners#999
t-regbs merged 3 commits into
mainfrom
feature/idea/web-import-error-states

Conversation

@t-regbs
Copy link
Copy Markdown
Collaborator

@t-regbs t-regbs commented May 6, 2026

Screen.Recording.2026-05-05.at.22.19.32.mov
Screen.Recording.2026-05-06.at.16.42.25.mov

📝 Changelog

If this PR introduces user-facing changes, please update the relevant Unreleased section in changelogs:

@egorikftp
Copy link
Copy Markdown
Member

I just checked the video. Perhaps we should hide the animated border for items in case of errors?

Overall nice improvement! 🔥

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 6, 2026

Review Change Stack

Walkthrough

This change introduces error banner support for the web import feature in the IDE plugin. A new BannerAction data class and actions property enable banners to display clickable actions. New event types track icon download and font load failures, mapped to a WebFailureReason enum for localization. Error banner integration in StandardImportScreenUI and SvgImportScreenUI displays failure messages with localized text and, for font failures, a retry action. Logging is added to view models for diagnostic purposes. A changelog entry and six new localization keys document the feature.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The description provides video demos and a changelog checklist template, but the checklist items are not marked as completed despite the raw summary showing CHANGELOG.md was updated. Explicitly mark the completed changelog item(s) in the description checklist and provide a brief summary of what error banners were added.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly and concisely summarizes the main change: implementing error banners for web import functionality.
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 feature/idea/web-import-error-states

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

@t-regbs
Copy link
Copy Markdown
Collaborator Author

t-regbs commented May 6, 2026

I just checked the video. Perhaps we should hide the animated border for items in case of errors?

Overall nice improvement! 🔥

Ah yeah, I think that makes sense. Will add that

@t-regbs t-regbs force-pushed the feature/idea/web-import-error-states branch from fb01344 to da62f8b Compare May 10, 2026 22:49
Copy link
Copy Markdown

@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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/common/StandardImportScreenUI.kt`:
- Around line 95-97: The handler for StandardIconEvent.IconDownloadFailed is
clearing selectedIcon unconditionally, allowing stale failures to clear a newer
selection; update the event type to include the icon identity (e.g., add an id
or URL field to IconDownloadFailed) and then, inside the
StandardIconEvent.IconDownloadFailed branch, compare the event's icon identity
against the current selectedIcon before setting selectedIcon = null and showing
the banner; alternatively, change the download flow to use a coroutine operator
like collectLatest/flatMapLatest so only the latest download result is delivered
(adjust code around downloadJob?.cancel(), the download coroutine, and the
StandardIconEvent handling to match the chosen approach).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: d407953f-8982-4f9c-ae0c-75f19a881c64

📥 Commits

Reviewing files that changed from the base of the PR and between 88f0b5d and da62f8b.

📒 Files selected for processing (9)
  • tools/idea-plugin/CHANGELOG.md
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/banner/BannerHost.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/banner/BannerMessage.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/common/StandardIconViewModel.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/common/StandardImportScreenUI.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/common/WebFailureReason.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/common/WebIconViewModel.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/svg/common/SvgImportScreenUI.kt
  • tools/idea-plugin/src/main/resources/messages/Valkyrie.properties

@t-regbs t-regbs merged commit 91633fa into main May 11, 2026
3 checks passed
@t-regbs t-regbs deleted the feature/idea/web-import-error-states branch May 11, 2026 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants