Skip to content

[Idea Plugin] Add contributors section to About screen#1012

Merged
egorikftp merged 1 commit into
mainfrom
feature/contributors
May 30, 2026
Merged

[Idea Plugin] Add contributors section to About screen#1012
egorikftp merged 1 commit into
mainfrom
feature/contributors

Conversation

@egorikftp

@egorikftp egorikftp commented May 29, 2026

Copy link
Copy Markdown
Member
Screenshot 2026-05-29 at 20 47 19

📝 Changelog

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

@coderabbitai

coderabbitai Bot commented May 29, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

This PR adds a contributors list feature to the About settings screen. It introduces domain models (AvatarByteArray and ContributorUiModel) to represent contributor data, a new AboutSettingsViewModel that manages contributor state and asynchronously fetches avatar bytes via HTTP, a ContributorItem composable that renders each contributor with avatar/link/description, and integrates everything into AboutSettingsScreen via a FlowRow layout. A localization entry is added for the contributors section header.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

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 ⚠️ Warning The PR description contains only a screenshot and the changelog template with unchecked boxes, lacking substantive explanation of changes. Add a detailed description explaining: the purpose of adding contributors section, what was implemented, technical approach, and any important notes. Ensure the changelog entry is checked off and updated with the changes made.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding a contributors section to the About screen in the IntelliJ plugin.
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/contributors

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/about/ui/ContributorItem.kt (1)

36-42: ⚖️ Poor tradeoff

Avatar decoding runs on the composition thread.

The remember(...) calculation block executes synchronously during composition, so ImageIO.read(...).toComposeImageBitmap() decodes the image on the UI thread each time avatarBytes changes. For a handful of small avatars this is minor, but consider decoding off the main thread (e.g. in the ViewModel coroutine alongside the fetch, or via LaunchedEffect + a background dispatcher) so decode work never blocks composition.

🤖 Prompt for 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.

In
`@tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/about/ui/ContributorItem.kt`
around lines 36 - 42, The avatar decoding is happening synchronously inside the
composition in the remember block for val bitmap using contributor.avatarBytes
and ImageIO.read(...).toComposeImageBitmap(), which blocks the UI thread; move
the decode off the main thread by performing image decoding in a background
coroutine (either in the ViewModel when fetching avatarBytes or inside the
composable via LaunchedEffect + withContext(Dispatchers.IO)) and expose a
decoded ImageBitmap state that the UI reads, keeping the composable lightweight
and replacing the synchronous remember(...) decode with a state that is set from
the background task.
🤖 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/settings/tabs/about/AboutSettingsViewModel.kt`:
- Around line 32-35: The current use of runCatching around
AvatarByteArray(httpClient.get(contributor.avatarUrl).bodyAsBytes()) swallows
CancellationException from the suspending httpClient.get call and prevents
cooperative cancellation; change the error handling so CancellationException is
re-thrown instead of converted to null (e.g., after runCatching or in a
getOrElse/getOrNull replacement, detect if the caught throwable is a
CancellationException and throw it, otherwise return null) and keep the rest of
the logic that assigns contributor.copy(avatarBytes = bytes).

---

Nitpick comments:
In
`@tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/about/ui/ContributorItem.kt`:
- Around line 36-42: The avatar decoding is happening synchronously inside the
composition in the remember block for val bitmap using contributor.avatarBytes
and ImageIO.read(...).toComposeImageBitmap(), which blocks the UI thread; move
the decode off the main thread by performing image decoding in a background
coroutine (either in the ViewModel when fetching avatarBytes or inside the
composable via LaunchedEffect + withContext(Dispatchers.IO)) and expose a
decoded ImageBitmap state that the UI reads, keeping the composable lightweight
and replacing the synchronous remember(...) decode with a state that is set from
the background task.
🪄 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: 774c5063-90d3-4c5d-ab7a-d29e45dde544

📥 Commits

Reviewing files that changed from the base of the PR and between c725a9c and d83a0dd.

📒 Files selected for processing (6)
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/about/AboutSettingsScreen.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/about/AboutSettingsViewModel.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/about/domain/AvatarByteArray.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/about/domain/ContributorUiModel.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/about/ui/ContributorItem.kt
  • tools/idea-plugin/src/main/resources/messages/Valkyrie.properties

@egorikftp egorikftp force-pushed the feature/contributors branch from d83a0dd to 78b7586 Compare May 30, 2026 06:39

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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/settings/tabs/about/domain/AvatarByteArray.kt`:
- Around line 5-7: The AvatarByteArray value class is incorrectly annotated with
`@Stable` while exposing a mutable ByteArray via its public bytes property; remove
the `@Stable` annotation from AvatarByteArray (keeping `@JvmInline` and the value
class) so Compose's stability contract is not violated, or alternatively make
the internal ByteArray private and expose a safe copy/accessor (e.g., fun
toByteArray(): ByteArray) instead—update the class definition around
AvatarByteArray/bytes accordingly.
🪄 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: bee2418c-2d72-4e6b-8171-ee7f980c094c

📥 Commits

Reviewing files that changed from the base of the PR and between d83a0dd and 78b7586.

📒 Files selected for processing (7)
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/about/AboutSettingsScreen.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/about/AboutSettingsViewModel.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/about/domain/AvatarByteArray.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/about/domain/ContributorUiModel.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/about/ui/ContributorItem.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/util/result/RunCatchingCancelable.kt
  • tools/idea-plugin/src/main/resources/messages/Valkyrie.properties
🚧 Files skipped from review as they are similar to previous changes (5)
  • tools/idea-plugin/src/main/resources/messages/Valkyrie.properties
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/about/domain/ContributorUiModel.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/about/ui/ContributorItem.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/about/AboutSettingsViewModel.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/about/AboutSettingsScreen.kt

@egorikftp

Copy link
Copy Markdown
Member Author

@t-regbs @Goooler @LennartEgb @jonapoul @vkatz thanks for your contribution to the project ❤️

@egorikftp egorikftp merged commit eb0b62a into main May 30, 2026
6 checks passed
@egorikftp egorikftp deleted the feature/contributors branch May 30, 2026 18:31
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