Skip to content

fix: 253 improve sonarqube coverage in the highest impact uncovered files#286

Merged
yacosta738 merged 13 commits into
mainfrom
fix/253-improve-sonarqube-coverage-in-the-highest-impact-uncovered-files
Mar 21, 2026
Merged

fix: 253 improve sonarqube coverage in the highest impact uncovered files#286
yacosta738 merged 13 commits into
mainfrom
fix/253-improve-sonarqube-coverage-in-the-highest-impact-uncovered-files

Conversation

@yacosta738
Copy link
Copy Markdown
Contributor

This pull request introduces improvements and refinements to both the Rust backend and the Kotlin Compose desktop client, focusing on enhanced type safety, improved UI design, and better cross-platform support. The most significant changes include stricter argument parsing for hardware tool commands, a visual and UX overhaul of the chat workspace, and expanded dependency support for macOS ARM64 targets.

Rust Backend Improvements

  • Robust argument parsing for hardware tools:

    • Introduced a parse_u64_arg helper in uno_q_bridge.rs to ensure that required arguments (pin, value) are present and of the correct type, improving runtime safety and error reporting. [1] [2]
    • Added a new async test verifying that non-numeric pin arguments are properly rejected with a clear error message.
  • Test coverage and configuration:

    • Updated test configuration in introspect.rs to only run certain tests when the hardware feature is enabled and the probe feature is not, preventing accidental test runs in unsupported configurations.
    • Expanded validation tests in peripherals/mod.rs to check for missing serial paths.

Kotlin Compose Desktop Client Enhancements

  • UI/UX modernization of chat workspace:

    • Refactored ChatWorkspace.kt to use a more futuristic tech aesthetic, including gradient dividers, updated header, and improved layout spacing. [1] [2] [3] [4] [5] [6] [7]
    • Updated default agent name and welcome messages for a more professional, English-language experience.
  • Cross-platform desktop support:

    • Switched dependency from compose.desktop.common to compose.desktop.currentOs in the Gradle build, and added new lockfile entries for macOS ARM64 and related libraries, improving support for Apple Silicon devices. [1] [2] [3] [4]

…ghest-impact-uncovered-files

# Conflicts:
#	clients/agent-runtime/src/hardware/introspect.rs
#	clients/agent-runtime/src/peripherals/mod.rs
#	clients/agent-runtime/src/peripherals/uno_q_bridge.rs
Introduce the new Corvus theme and redesigned chat, config, and onboarding flows while switching desktop dependencies to the current OS runtime so the desktop app starts correctly on macOS ARM64.
Replace the deprecated send icon with the AutoMirrored variant so composeApp builds without that warning in shared chat UI.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 20, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Refined Rust test gating and added peripheral unit-test coverage; introduced shared arg-parsing helper for UnoQ bridge. Large Compose UI redesign: new Corvus theming (colors, tokens), glassmorphic components, revamped chat/onboarding/config UIs. Build/CI updates: Compose desktop dependency switch, OS-specific lock exclusions, and Git hook enhancements.

Changes

Cohort / File(s) Summary
Rust agent-runtime tests & peripherals
clients/agent-runtime/src/hardware/introspect.rs, clients/agent-runtime/src/peripherals/mod.rs, clients/agent-runtime/src/peripherals/uno_q_bridge.rs
Tightened test cfg for an introspect test to require hardware and not probe; added a serial None path unit test; introduced parse_u64_arg(args, name) helper and tests asserting explicit "Invalid '<name>' type" errors for UnoQ GPIO tools.
Compose build & lockfiles
clients/composeApp/build.gradle.kts, clients/composeApp/gradle.lockfile, gradle/build-logic/.../check.locking.gradle.kts
Switched Compose dependency to compose.desktop.currentOs; added macOS ARM64 lock entries; excluded Compose OS-specific JVM configurations from dependency locking for :composeApp.
Pre-commit / pre-push hooks & CONTRIBUTING
gradle/configs/git/hooks/pre-commit.sh, gradle/configs/git/hooks/pre-push.sh, CONTRIBUTING.md
Pre-commit now runs ./gradlew spotlessApply on staged Kotlin/Gradle files and re-stages them; pre-push enforces ./gradlew checkLocksAll --no-parallel and runs CI-aligned coverage tasks; CONTRIBUTING updated to document managed hooks.
Theme infrastructure
clients/composeApp/src/commonMain/kotlin/.../theme/Color.kt, clients/composeApp/src/commonMain/kotlin/.../theme/Theme.kt, (removed) clients/composeApp/src/commonMain/kotlin/.../theme/CorvusTheme.kt
Added color constants, gradient palettes, CorvusColorPalette, DarkCorvusColors/LightCorvusColors, CorvusTokens, LocalCorvusTokens, and a new CorvusTheme composable; removed the old CorvusTheme implementation file.
Chat UI components
clients/composeApp/src/commonMain/kotlin/.../chat/ChatComponents.kt
Large UI refactor: replaced legacy chat internals with glassmorphic components and new public composables (GlassSurface, GradientButton, ChatBubble, ChatInputField, StatusIndicator, ChatHeader, endpointCard), updated shapes, animations, and input/send behavior.
Chat workspace & config panel
clients/composeApp/src/commonMain/kotlin/.../chat/ChatWorkspace.kt, .../ConfigPanel.kt
Changed default agent name and English copy, added isGatewayConfigured state and gateway save/test actions, separated draft vs saved gateway handling, simplified send guard, integrated new UI layout and ChatInputField, refactored config panel to segmented settings, status indicator, and API reference cards.
Onboarding UI
clients/composeApp/src/commonMain/kotlin/.../onboarding/OnboardingScreen.kt
Rebuilt onboarding: added OnboardingIcon enum and per-step icons, new animated icon display and FuturisticProgressIndicator, gradient background, and replaced legacy controls with GradientButton and updated layout.
Misc build tooling
gradle/build-logic/src/main/kotlin/com.profiletailors.check.locking.gradle.kts
Added composeAppOsSpecificExcludedLockingConfigurations and updated Configuration.shouldUseDependencyLocking() to skip locking for those Compose JVM configs.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested labels

area:rust, area:kotlin, area:gradle, risk:high

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title uses a conventional commit prefix (fix) and describes a real change, but exceeds the 72-character limit by 1 character. Shorten the title to 72 characters or fewer, e.g., 'fix: improve sonarqube coverage in highest-impact uncovered files'.
Docstring Coverage ⚠️ Warning Docstring coverage is 32.43% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The PR description is comprehensive and well-structured, covering related Rust and Kotlin changes with clear motivation and context.

✏️ 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/253-improve-sonarqube-coverage-in-the-highest-impact-uncovered-files

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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 20, 2026

✅ Contributor Report

User: @yacosta738
Status: Passed (12/13 metrics passed)

Metric Description Value Threshold Status
PR Merge Rate PRs merged vs closed 89% >= 30%
Repo Quality Repos with ≥100 stars 0 >= 0
Positive Reactions Positive reactions received 9 >= 1
Negative Reactions Negative reactions received 0 <= 5
Account Age GitHub account age 3066 days >= 30 days
Activity Consistency Regular activity over time 108% >= 0%
Issue Engagement Issues with community engagement 0 >= 0
Code Reviews Code reviews given to others 423 >= 0
Merger Diversity Unique maintainers who merged PRs 2 >= 0
Repo History Merge Rate Merge rate in this repo 91% >= 0%
Repo History Min PRs Previous PRs in this repo 165 >= 0
Profile Completeness Profile richness (bio, followers) 90 >= 0
Suspicious Patterns Spam-like activity detection 1 N/A

Contributor Report evaluates based on public GitHub activity. Analysis period: 2025-03-21 to 2026-03-21

Exclude composeApp JVM desktop classpaths from dependency locking so macOS and Linux resolve their own Compose desktop runtime variants without breaking checkLocks or Sonar builds in CI.
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Mar 20, 2026

Deploying corvus with  Cloudflare Pages  Cloudflare Pages

Latest commit: ac3e48e
Status: ✅  Deploy successful!
Preview URL: https://32da348e.corvus-42x.pages.dev
Branch Preview URL: https://fix-253-improve-sonarqube-co.corvus-42x.pages.dev

View logs

Run Spotless on staged Kotlin and Gradle files before commit, and add dependency lock plus coverage-oriented Gradle checks before push so contributors catch CI issues earlier.
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: 9

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
clients/agent-runtime/src/peripherals/uno_q_bridge.rs (1)

68-72: 🧹 Nitpick | 🔵 Trivial

Inconsistent error handling between read and write tools.

UnoQGpioReadTool::execute still uses the old inline pattern which conflates missing parameter with invalid type—both yield "Missing 'pin' parameter". This is inconsistent with UnoQGpioWriteTool which now distinguishes them via parse_u64_arg.

♻️ Apply `parse_u64_arg` for consistency
     async fn execute(&self, args: Value) -> anyhow::Result<ToolResult> {
-        let pin = args
-            .get("pin")
-            .and_then(|v| v.as_u64())
-            .ok_or_else(|| anyhow::anyhow!("Missing 'pin' parameter"))?;
+        let pin = parse_u64_arg(&args, "pin")?;
         match bridge_request("gpio_read", &[pin.to_string()]).await {

Consider adding a test case for invalid pin type in the read tool as well.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@clients/agent-runtime/src/peripherals/uno_q_bridge.rs` around lines 68 - 72,
UnoQGpioReadTool::execute currently uses an inline pattern that treats a missing
"pin" and an invalid-type "pin" the same; update it to call the shared
parse_u64_arg helper (same as UnoQGpioWriteTool::execute) to distinguish missing
vs invalid-type errors, replacing the .get(...).and_then(...).ok_or_else(...)
chain with parse_u64_arg(args, "pin") and propagate its error; also add a unit
test for UnoQGpioReadTool that passes an invalid-type pin value to assert the
parse_u64_arg-style error is returned.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@clients/composeApp/build.gradle.kts`:
- Line 62: The dependency compose.desktop.currentOs causes lockfile drift across
OS/arch boundaries; replace its unconditional use by adding a conditional in the
build script that, when System.getProperty("bundle.all.targets") == "true",
declares all desktop target variants (linux_x64, linux_arm64, windows_x64,
macos_x64, macos_arm64) as implementation dependencies, and otherwise keeps
implementation(compose.desktop.currentOs); then regenerate locks using ./gradlew
dependencies --write-locks -Dbundle.all.targets=true so the lockfile includes
all variants for reproducible CI builds.

In `@clients/composeApp/gradle.lockfile`:
- Line 354: CI failed checkLocks because the committed gradle.lockfile is out of
date; run the Gradle lock generation for the composeApp module by executing the
:composeApp:writeLocksAll task (e.g., ./gradlew :composeApp:writeLocksAll), then
commit the updated clients/composeApp/gradle.lockfile (including the full
canonical lock output such as the empty=... line shown) so
:composeApp:checkLocks passes.

In
`@clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/chat/ChatComponents.kt`:
- Around line 144-233: The ChatBubble function is too long and contains a dead
variable gradientColors; refactor by removing gradientColors and extracting the
avatar, header, and body into small composables (e.g., AvatarWithGlow,
ChatBubbleHeader, ChatBubbleBody) and move the shadow/shape/brush logic into
those helpers: keep ChatBubble as a thin orchestrator that computes isUser and
colors then calls AvatarWithGlow when !isUser (use the existing Box avatar
implementation), call ChatBubbleHeader to render the "You" / modelName Text with
the correct color, and call ChatBubbleBody to render the Surface/Column/Text
(preserving ChatBubbleShape, border Brush.horizontalGradient, shadows, widthIn
and paddings) so behavior is unchanged but the function length is reduced and
gradientColors is eliminated.

In
`@clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/chat/ConfigPanel.kt`:
- Around line 214-226: The Test Connection and Save buttons in ConfigPanel are
using placeholder lambdas; add explicit callbacks to ChatWorkspaceActions (e.g.,
testConnection(...) and saveWorkspaceConfig(...) or similar) and call them from
the button onClick handlers instead of the empty lambdas — update
ChatWorkspaceActions to expose the two methods, accept the current
workspace/config state (the same state used in ConfigPanel), and wire the
OutlinedButton onClick (Test Connection) and the GradientButton onClick (Save)
to invoke those actions so the panel actually validates and persists changes.
- Around line 128-129: The StatusIndicator currently treats any non-empty
gatewayConfig.baseUrl as connected, which is incorrect; update the ConfigPanel
so StatusIndicator reflects real health instead of URL presence: either pass a
real health/connected boolean from the component that performs the probe/pairing
check (e.g., replace connected = gatewayConfig.baseUrl.isNotBlank() with
connected = gatewayHealth.isHealthy or similar boolean returned by your probe
method), or if you don't have a health check yet, rename the prop and the
indicator usage to configured/configuredState (e.g., configured =
gatewayConfig.baseUrl.isNotBlank()) and update StatusIndicator to show
"Configured" instead of "Connected"; locate usages around StatusIndicator in
ConfigPanel and adjust the prop name and consumer accordingly.

In
`@clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/onboarding/OnboardingScreen.kt`:
- Around line 305-307: The private StepIndicator wrapper is unused and
introduces dead code/detekt failures; either delete the StepIndicator function
entirely or restore compatibility by making it public and matching the previous
API so callers can use it (e.g., change visibility from private to public and
ensure its parameters/current behavior delegate to
FuturisticProgressIndicator(currentStep = currentStepIndex, totalSteps =
totalSteps)); remove any unused imports or references left behind after
deletion.
- Around line 121-129: The Skip text is currently inert; wire it to the provided
onSkip callback by making the Text composable actionable: replace or modify the
Text in OnboardingScreen (the Text inside the Box) so it invokes onSkip when
activated and exposes button semantics for accessibility (e.g., use a
Button/TextButton or add Modifier.clickable { onSkip() } plus appropriate
semantics/role = Role.Button). Ensure the displayed styling
(MaterialTheme.typography.labelLarge, color, padding, shape) is preserved when
converting to an interactive control and that the onSkip lambda is called on
click/activation.

In
`@clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/theme/Color.kt`:
- Around line 40-63: CorvusColors is a singleton, so theme switches in
CorvusTheme don’t change values like glassSurface, glassOverlay, userBubble or
aiBubble; refactor to a theme-aware palette: define a ColorPalette (or
CorvusColorScheme) data class/interface, provide light and dark instances (e.g.,
LightCorvusColors, DarkCorvusColors), and expose the current instance from
CorvusTheme instead of the CorvusColors object so callers read
CorvusTheme.current.colors.glassSurface / .glassOverlay / .userBubble /
.aiBubble (or similar) rather than the static CorvusColors constants.

In
`@clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/theme/Theme.kt`:
- Around line 212-287: CorvusShapes is never passed into MaterialTheme so custom
shapes are unused; update the CorvusTheme composable to pass shapes =
CorvusShapes into the MaterialTheme(...) call (i.e., MaterialTheme(colorScheme =
colorScheme, typography = CorvusTypography, shapes = CorvusShapes, content =
content)) and remove the private Shapes data class (replace it with the standard
androidx.compose.material3.Shapes import) so the CorvusShapes type aligns with
Material3's Shapes.

---

Outside diff comments:
In `@clients/agent-runtime/src/peripherals/uno_q_bridge.rs`:
- Around line 68-72: UnoQGpioReadTool::execute currently uses an inline pattern
that treats a missing "pin" and an invalid-type "pin" the same; update it to
call the shared parse_u64_arg helper (same as UnoQGpioWriteTool::execute) to
distinguish missing vs invalid-type errors, replacing the
.get(...).and_then(...).ok_or_else(...) chain with parse_u64_arg(args, "pin")
and propagate its error; also add a unit test for UnoQGpioReadTool that passes
an invalid-type pin value to assert the parse_u64_arg-style error is returned.
🪄 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 9addc881-dc92-4835-b010-176a5c8df12f

📥 Commits

Reviewing files that changed from the base of the PR and between b1eb9ff and 588f944.

📒 Files selected for processing (12)
  • clients/agent-runtime/src/hardware/introspect.rs
  • clients/agent-runtime/src/peripherals/mod.rs
  • clients/agent-runtime/src/peripherals/uno_q_bridge.rs
  • clients/composeApp/build.gradle.kts
  • clients/composeApp/gradle.lockfile
  • clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/chat/ChatComponents.kt
  • clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/chat/ChatWorkspace.kt
  • clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/chat/ConfigPanel.kt
  • clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/onboarding/OnboardingScreen.kt
  • clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/theme/Color.kt
  • clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/theme/CorvusTheme.kt
  • clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/theme/Theme.kt
💤 Files with no reviewable changes (1)
  • clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/theme/CorvusTheme.kt
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: pr-checks
  • GitHub Check: Cloudflare Pages
🧰 Additional context used
📓 Path-based instructions (6)
clients/agent-runtime/src/**/*.rs

📄 CodeRabbit inference engine (clients/agent-runtime/AGENTS.md)

clients/agent-runtime/src/**/*.rs: Never log secrets, tokens, raw credentials, or sensitive payloads in any logging statements
Avoid unnecessary allocations, clones, and blocking operations to maintain performance and efficiency

Files:

  • clients/agent-runtime/src/peripherals/mod.rs
  • clients/agent-runtime/src/hardware/introspect.rs
  • clients/agent-runtime/src/peripherals/uno_q_bridge.rs
clients/agent-runtime/**/*.rs

📄 CodeRabbit inference engine (clients/agent-runtime/AGENTS.md)

Run cargo fmt --all -- --check, cargo clippy --all-targets -- -D warnings, and cargo test for code validation, or document which checks were skipped and why

Files:

  • clients/agent-runtime/src/peripherals/mod.rs
  • clients/agent-runtime/src/hardware/introspect.rs
  • clients/agent-runtime/src/peripherals/uno_q_bridge.rs
**/*.rs

⚙️ CodeRabbit configuration file

**/*.rs: Focus on Rust idioms, memory safety, and ownership/borrowing correctness.
Flag unnecessary clones, unchecked panics in production paths, and weak error context.
Prioritize unsafe blocks, FFI boundaries, concurrency races, and secret handling.

Files:

  • clients/agent-runtime/src/peripherals/mod.rs
  • clients/agent-runtime/src/hardware/introspect.rs
  • clients/agent-runtime/src/peripherals/uno_q_bridge.rs
**/*

⚙️ CodeRabbit configuration file

**/*: Security first, performance second.
Validate input boundaries, auth/authz implications, and secret management.
Look for behavioral regressions, missing tests, and contract breaks across modules.

Files:

  • clients/agent-runtime/src/peripherals/mod.rs
  • clients/agent-runtime/src/hardware/introspect.rs
  • clients/agent-runtime/src/peripherals/uno_q_bridge.rs
  • clients/composeApp/gradle.lockfile
  • clients/composeApp/build.gradle.kts
  • clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/theme/Color.kt
  • clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/chat/ConfigPanel.kt
  • clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/onboarding/OnboardingScreen.kt
  • clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/chat/ChatWorkspace.kt
  • clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/theme/Theme.kt
  • clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/chat/ChatComponents.kt
**/*.gradle.kts

⚙️ CodeRabbit configuration file

**/*.gradle.kts: Prefer tasks.register/configureEach, avoid afterEvaluate, and preserve configuration cache.
Ensure dependencies come from version catalogs and avoid eager task realization.
Review plugin/config changes for supply-chain and reproducibility risks.

Files:

  • clients/composeApp/build.gradle.kts
**/*.kt

⚙️ CodeRabbit configuration file

**/*.kt: Enforce null safety (no !!), structured concurrency, and non-blocking suspend code.
Prefer idiomatic Kotlin (expression bodies, sealed types, value classes when justified).
Verify tests follow TDD intent and use backtick test names where applicable.

Files:

  • clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/theme/Color.kt
  • clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/chat/ConfigPanel.kt
  • clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/onboarding/OnboardingScreen.kt
  • clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/chat/ChatWorkspace.kt
  • clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/theme/Theme.kt
  • clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/chat/ChatComponents.kt
🧠 Learnings (3)
📓 Common learnings
Learnt from: CR
Repo: dallay/corvus PR: 0
File: clients/agent-runtime/AGENTS.md:0-0
Timestamp: 2026-02-17T12:31:17.076Z
Learning: Applies to clients/agent-runtime/**/*.rs : Run `cargo fmt --all -- --check`, `cargo clippy --all-targets -- -D warnings`, and `cargo test` for code validation, or document which checks were skipped and why
📚 Learning: 2026-02-17T12:31:17.076Z
Learnt from: CR
Repo: dallay/corvus PR: 0
File: clients/agent-runtime/AGENTS.md:0-0
Timestamp: 2026-02-17T12:31:17.076Z
Learning: Applies to clients/agent-runtime/src/main.rs : Preserve CLI contract unless change is intentional and documented; prefer explicit errors over silent fallback for unsupported critical paths

Applied to files:

  • clients/agent-runtime/src/peripherals/mod.rs
  • clients/agent-runtime/src/hardware/introspect.rs
  • clients/agent-runtime/src/peripherals/uno_q_bridge.rs
📚 Learning: 2026-02-17T12:31:17.076Z
Learnt from: CR
Repo: dallay/corvus PR: 0
File: clients/agent-runtime/AGENTS.md:0-0
Timestamp: 2026-02-17T12:31:17.076Z
Learning: Applies to clients/agent-runtime/**/*.rs : Run `cargo fmt --all -- --check`, `cargo clippy --all-targets -- -D warnings`, and `cargo test` for code validation, or document which checks were skipped and why

Applied to files:

  • clients/agent-runtime/src/peripherals/mod.rs
  • clients/agent-runtime/src/hardware/introspect.rs
🪛 GitHub Actions: PR Checks
clients/composeApp/gradle.lockfile

[error] 1-1: Execution failed for task ':composeApp:checkLocks'. gradle.lockfile changed; please run './gradlew writeLocksAll' and commit the updates.

clients/composeApp/build.gradle.kts

[error] 1-1: Process completed with exit code 1.

🪛 GitHub Actions: Scan with Detekt
clients/composeApp/build.gradle.kts

[error] 44-44: detekt [UnusedPrivateProperty]: Private property commonMain is unused.


[error] 58-58: detekt [UnusedPrivateProperty]: Private property commonTest is unused.


[error] 60-60: detekt [UnusedPrivateProperty]: Private property jvmMain is unused.


[error] 67-67: detekt [UnusedPrivateProperty]: Private property androidMain is unused.

clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/chat/ConfigPanel.kt

[error] 98-98: detekt [LongMethod]: The function ConfigSettingsList is too long (148). The maximum length is 60.


[error] 67-67: detekt [FunctionNaming]: Function name does not match pattern [a-z][a-zA-Z0-9]*.


[error] 98-98: detekt [FunctionNaming]: Function name does not match pattern [a-z][a-zA-Z0-9]*.


[error] 275-275: detekt [FunctionNaming]: Function name does not match pattern [a-z][a-zA-Z0-9]*.

clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/onboarding/OnboardingScreen.kt

[error] 95-95: detekt [LongParameterList]: The function OnboardingScreen has too many parameters (threshold 6).


[error] 95-95: detekt [LongMethod]: The function OnboardingScreen is too long (71). The maximum length is 60.


[error] 95-95: detekt [FunctionNaming]: Function name does not match pattern [a-z][a-zA-Z0-9]*.


[error] 198-198: detekt [FunctionNaming]: Function name does not match pattern [a-z][a-zA-Z0-9]*.


[error] 245-245: detekt [FunctionNaming]: Function name does not match pattern [a-z][a-zA-Z0-9]*.


[error] 306-306: detekt [FunctionNaming]: Function name does not match pattern [a-z][a-zA-Z0-9]*.


[error] 100-100: detekt [UnusedParameter]: Function parameter onSkip is unused.


[error] 306-306: detekt [UnusedPrivateMember]: Private function StepIndicator is unused.

clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/theme/Theme.kt

[error] 279-279: detekt [FunctionNaming]: Function name does not match pattern [a-z][a-zA-Z0-9]*.


[error] 212-212: detekt [UnusedPrivateProperty]: Private property CorvusShapes is unused.

clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/chat/ChatComponents.kt

[error] 144-144: detekt [LongMethod]: The function ChatBubble is too long (85). The maximum length is 60.


[error] 77-77: detekt [FunctionNaming]: Function name does not match pattern [a-z][a-zA-Z0-9]*.


[error] 103-103: detekt [FunctionNaming]: Function name does not match pattern [a-z][a-zA-Z0-9]*.


[error] 144-144: detekt [FunctionNaming]: Function name does not match pattern [a-z][a-zA-Z0-9]*.


[error] 240-240: detekt [FunctionNaming]: Function name does not match pattern [a-z][a-zA-Z0-9]*.


[error] 313-313: detekt [FunctionNaming]: Function name does not match pattern [a-z][a-zA-Z0-9]*.


[error] 350-350: detekt [FunctionNaming]: Function name does not match pattern [a-z][a-zA-Z0-9]*.


[error] 105-105: detekt [UnusedParameter]: Function parameter onClick is unused.


[error] 149-149: detekt [UnusedPrivateProperty]: Private property gradientColors is unused.

🪛 GitHub Actions: SonarQube Analysis
clients/composeApp/build.gradle.kts

[warning] 54-54: Gradle/Kotlin Compose warning: 'val materialIconsExtended: String' is deprecated (pinned to version 1.7.3); migrate to Material Symbols (vector resources).

🔇 Additional comments (10)
clients/agent-runtime/src/peripherals/mod.rs (1)

377-380: Nice coverage addition for missing serial path.

This assertion closes the path: None validation case and matches the existing contract/error message for invalid serial transport config.

clients/agent-runtime/src/hardware/introspect.rs (1)

130-138: LGTM! Correctly gates test to match the code path it validates.

The updated cfg attribute now properly restricts this test to run only when hardware is enabled but probe is not—aligning with the static fallback behavior being asserted (lines 79-82). Previously, running with both features would test the wrong code path.

clients/agent-runtime/src/peripherals/uno_q_bridge.rs (3)

16-23: Well-designed helper with clear error semantics.

Distinct error messages for missing vs invalid type improve debuggability. The &'static str lifetime is appropriate here since callers pass literals.


132-133: Clean refactor using the new helper.

Both required arguments now have consistent validation with clear error differentiation.


207-217: Good test coverage for type validation.

Confirms the helper correctly rejects string-typed numeric arguments.

clients/composeApp/gradle.lockfile (1)

203-344: Good lock additions for Apple Silicon runtime support.

Lines 203 and 344 correctly add macOS ARM64 Compose Desktop/Skiko runtime locks, matching the platform-support goal.

clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/chat/ChatWorkspace.kt (1)

120-143: LGTM: blank sends are rejected before state mutation.

Trimming once and returning early keeps the user message and local assistant echo aligned.

clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/chat/ChatComponents.kt (1)

102-137: Add .clickable() modifier—GradientButton cannot handle clicks.

The onClick callback is unused. The Box lacks a .clickable() modifier, making every CTA built on this component unresponsive (onboarding flows, etc.).

Add .clickable(enabled = enabled, role = Role.Button, onClick = onClick) to the modifier chain after .clip().

clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/onboarding/OnboardingScreen.kt (1)

95-103: Address detekt blockers and skip affordance regression in onboarding composables.

OnboardingScreen and the new PascalCase helpers still trigger detekt violations (LongMethod/LongParameterList/FunctionNaming at lines 95, 198, 245, 306). Additionally, the skip affordance is rendered as non-interactive Text rather than a clickable control, preventing users from skipping the onboarding flow.

Extract the top/bottom sections into separate composables, apply the repo's idiomatic Compose naming conventions, and make the skip affordance functional before merging.

clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/theme/Theme.kt (1)

279-303: Add @Suppress("FunctionNaming") to CorvusTheme function or file-level.

The function name CorvusTheme starts with a capital letter, which violates detekt's FunctionNaming rule (default pattern: [a-z][a-zA-Z0-9]*). While this mirrors the standard Compose theme pattern used by MaterialTheme, the naming rule is enforced by default. Apply the suppression locally to align with your detekt configuration.

Comment thread clients/composeApp/build.gradle.kts
Comment thread clients/composeApp/gradle.lockfile
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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
gradle/build-logic/src/main/kotlin/com.profiletailors.check.locking.gradle.kts (1)

38-59: ⚠️ Potential issue | 🟡 Minor

Fix detekt ReturnCount violation (CI blocker).

The function has 5 return statements, exceeding detekt's limit of 2. Consolidate the conditions to reduce returns.

Proposed fix
 fun Configuration.shouldUseDependencyLocking(): Boolean {
-  if (!isCanBeResolved) {
-    return false
-  }
-
-  if (name in excludedLockingConfigurations) {
-    return false
-  }
-
-  if (
-    project.rootProject.name == "corvus-build-logic" &&
-      name in buildLogicOnlyExcludedLockingConfigurations
-  ) {
-    return false
-  }
-
-  if (project.path == ":composeApp" && name in composeAppOsSpecificExcludedLockingConfigurations) {
-    return false
-  }
-
-  return excludedLockingConfigurationPrefixes.none { prefix -> name.startsWith(prefix) }
+  if (!isCanBeResolved) return false
+
+  val isExcludedByName = name in excludedLockingConfigurations
+  val isExcludedBuildLogic = project.rootProject.name == "corvus-build-logic" &&
+    name in buildLogicOnlyExcludedLockingConfigurations
+  val isExcludedComposeApp = project.path == ":composeApp" &&
+    name in composeAppOsSpecificExcludedLockingConfigurations
+  val isExcludedByPrefix = excludedLockingConfigurationPrefixes.any { name.startsWith(it) }
+
+  return !isExcludedByName && !isExcludedBuildLogic && !isExcludedComposeApp && !isExcludedByPrefix
 }

Alternatively, suppress the rule locally if the team prefers the current clarity:

`@Suppress`("ReturnCount")
fun Configuration.shouldUseDependencyLocking(): Boolean { ... }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@gradle/build-logic/src/main/kotlin/com.profiletailors.check.locking.gradle.kts`
around lines 38 - 59, The function shouldUseDependencyLocking currently uses
multiple early returns (isCanBeResolved, excludedLockingConfigurations,
project.rootProject.name/buildLogicOnlyExcludedLockingConfigurations,
project.path/composeAppOsSpecificExcludedLockingConfigurations and
excludedLockingConfigurationPrefixes) which trips detekt's ReturnCount rule;
consolidate these checks into a single Boolean expression and return once (e.g.,
compute a combined condition using &&/|| and startsWith for prefixes) so there
is only one return statement, or alternatively add `@Suppress`("ReturnCount")
above shouldUseDependencyLocking if you prefer to keep the early-return style.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@gradle/configs/git/hooks/pre-commit.sh`:
- Line 18: The current FORMAT_FILE_REGEX in pre-commit.sh includes .groovy and
plain .gradle which Spotless doesn't format; update the regex
(FORMAT_FILE_REGEX) to only match files Spotless is configured for (e.g. .kt,
.kts, .java and the Kotlin Gradle scripts). Replace the pattern with one that
matches .kt, .kts, .java and .gradle.kts (and/or specific gradle kts filenames
like build.gradle.kts and settings.gradle.kts) such as
'\.(kt|kts|java|gradle\.kts)$' or a variant including
'(build|settings)\.gradle\.kts' so the pre-commit hook only attempts
spotlessApply on supported file types.

---

Outside diff comments:
In
`@gradle/build-logic/src/main/kotlin/com.profiletailors.check.locking.gradle.kts`:
- Around line 38-59: The function shouldUseDependencyLocking currently uses
multiple early returns (isCanBeResolved, excludedLockingConfigurations,
project.rootProject.name/buildLogicOnlyExcludedLockingConfigurations,
project.path/composeAppOsSpecificExcludedLockingConfigurations and
excludedLockingConfigurationPrefixes) which trips detekt's ReturnCount rule;
consolidate these checks into a single Boolean expression and return once (e.g.,
compute a combined condition using &&/|| and startsWith for prefixes) so there
is only one return statement, or alternatively add `@Suppress`("ReturnCount")
above shouldUseDependencyLocking if you prefer to keep the early-return style.
🪄 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 840b75e3-4d78-4b93-9626-53195de9f452

📥 Commits

Reviewing files that changed from the base of the PR and between 588f944 and 4824bbf.

📒 Files selected for processing (5)
  • CONTRIBUTING.md
  • clients/composeApp/gradle.lockfile
  • gradle/build-logic/src/main/kotlin/com.profiletailors.check.locking.gradle.kts
  • gradle/configs/git/hooks/pre-commit.sh
  • gradle/configs/git/hooks/pre-push.sh
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: pr-checks-build-logic
  • GitHub Check: sonar
  • GitHub Check: Cloudflare Pages
🧰 Additional context used
📓 Path-based instructions (3)
**/*

⚙️ CodeRabbit configuration file

**/*: Security first, performance second.
Validate input boundaries, auth/authz implications, and secret management.
Look for behavioral regressions, missing tests, and contract breaks across modules.

Files:

  • gradle/configs/git/hooks/pre-commit.sh
  • gradle/configs/git/hooks/pre-push.sh
  • CONTRIBUTING.md
  • gradle/build-logic/src/main/kotlin/com.profiletailors.check.locking.gradle.kts
**/*.{md,mdx}

⚙️ CodeRabbit configuration file

**/*.{md,mdx}: Verify technical accuracy and that docs stay aligned with code changes.
For user-facing docs, check EN/ES parity or explicitly note pending translation gaps.

Files:

  • CONTRIBUTING.md
**/*.gradle.kts

⚙️ CodeRabbit configuration file

**/*.gradle.kts: Prefer tasks.register/configureEach, avoid afterEvaluate, and preserve configuration cache.
Ensure dependencies come from version catalogs and avoid eager task realization.
Review plugin/config changes for supply-chain and reproducibility risks.

Files:

  • gradle/build-logic/src/main/kotlin/com.profiletailors.check.locking.gradle.kts
🧠 Learnings (2)
📚 Learning: 2026-02-17T12:31:17.076Z
Learnt from: CR
Repo: dallay/corvus PR: 0
File: clients/agent-runtime/AGENTS.md:0-0
Timestamp: 2026-02-17T12:31:17.076Z
Learning: Applies to clients/agent-runtime/.github/**/*.{yml,yaml} : For workflow/template-only changes, ensure YAML/template syntax validity

Applied to files:

  • gradle/configs/git/hooks/pre-commit.sh
📚 Learning: 2026-02-17T12:31:17.076Z
Learnt from: CR
Repo: dallay/corvus PR: 0
File: clients/agent-runtime/AGENTS.md:0-0
Timestamp: 2026-02-17T12:31:17.076Z
Learning: Applies to clients/agent-runtime/**/*.rs : Run `cargo fmt --all -- --check`, `cargo clippy --all-targets -- -D warnings`, and `cargo test` for code validation, or document which checks were skipped and why

Applied to files:

  • gradle/configs/git/hooks/pre-push.sh
  • CONTRIBUTING.md
🪛 GitHub Actions: Scan with Detekt
gradle/build-logic/src/main/kotlin/com.profiletailors.check.locking.gradle.kts

[error] 38-38: detekt: Function shouldUseDependencyLocking has 5 return statements which exceeds the limit of 2. [ReturnCount]

🔇 Additional comments (5)
gradle/configs/git/hooks/pre-commit.sh (1)

21-30: LGTM!

The formatting and re-staging logic is sound. The existence check before git add handles edge cases where files may have been deleted between staging and formatting.

gradle/build-logic/src/main/kotlin/com.profiletailors.check.locking.gradle.kts (1)

28-36: LGTM!

The exclusion set correctly covers all JVM compile/runtime classpath configurations generated by the KMP jvm() target. This aligns with the switch to compose.desktop.currentOs for platform-specific resolution.

gradle/configs/git/hooks/pre-push.sh (2)

23-24: LGTM!

Running checkLocksAll --no-parallel unconditionally catches lockfile drift before push. The --no-parallel flag is appropriate since the task runs nested Gradle commands.


28-36: LGTM!

Explicitly invoking the Kover report tasks ensures coverage XML is generated regardless of task graph wiring. The --no-daemon flag is appropriate for git hooks.

CONTRIBUTING.md (1)

41-52: LGTM!

Documentation accurately reflects the updated hook behavior. The pre-commit and pre-push descriptions match the corresponding shell scripts.

Comment thread gradle/configs/git/hooks/pre-commit.sh Outdated
Use the shared Uno Q argument parser for gpio_read so invalid pin types return the same explicit error as gpio_write, and cover the regression with a focused unit test.
Refactor the shared chat UI into smaller theme-aware pieces, make onboarding skip actionable, connect gateway configuration actions to saved workspace state, and use Material3 shapes plus a dynamic Corvus color palette so light/dark behavior stays coherent.
Limit the pre-commit Spotless trigger to supported Kotlin and Gradle Kotlin files, and collapse dependency locking eligibility into a single boolean return to satisfy detekt without changing behavior.
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: 4

♻️ Duplicate comments (1)
clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/chat/ChatWorkspace.kt (1)

165-167: ⚠️ Potential issue | 🟠 Major

Test Connection still never tests the gateway.

This only sets isGatewayConfigured from isGatewayConfigConfigured, and the helper at Lines 306-309 only checks whether the URL starts with http:// or https://. An unreachable or malformed host still shows as configured. Either probe /health before flipping the flag, or rename the action so it matches URL validation instead of connectivity. As per coding guidelines, **/*: Look for behavioral regressions, missing tests, and contract breaks across modules.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/chat/ChatWorkspace.kt`
around lines 165 - 167, The current onTestConnection handler only sets
isGatewayConfigured via isGatewayConfigConfigured (which merely checks URL
scheme), so it falsely reports success for unreachable hosts; update
onTestConnection in ChatWorkspace to perform an actual connectivity probe (e.g.,
HTTP GET to config.baseUrl + "/health" or another agreed health endpoint) and
set isGatewayConfigured true only when the probe returns a successful response
(200-range) and false on non-2xx or exceptions; use the existing
isGatewayConfigConfigured as a quick-syntax check first, then attempt the
network probe (catching and logging errors) before flipping isGatewayConfigured,
or alternatively rename the action and UI label to reflect it only validates URL
format (e.g., validateGatewayUrl) if you prefer not to perform network I/O.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@clients/agent-runtime/src/peripherals/uno_q_bridge.rs`:
- Around line 129-131: The code parses pin and value with parse_u64_arg but
doesn't enforce the gpio_write contract that value must be 0 or 1; add a
validation after obtaining value (and before calling bridge_request) to check
that value == 0 || value == 1 and return an appropriate Err (mirror the
function's existing error type/propagate a clear error) when out of range,
referencing the variables value and pin and the bridge_request("gpio_write",
...) call so the guard executes prior to dispatching to bridge_request.

In
`@clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/chat/ChatComponents.kt`:
- Around line 105-117: The GradientButton Box's clickable modifier is missing an
accessibility role; update the clickable call in GradientButton (in
ChatComponents.kt) to pass role = Role.Button so accessibility services announce
it as a button (ensure you import androidx.compose.ui.semantics.Role or the
appropriate Role symbol used in your project).

In
`@clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/chat/ChatWorkspace.kt`:
- Around line 97-106: The credentials (draftBearerToken, draftWebhookSecret,
savedBearerToken, savedWebhookSecret) are stored with rememberSaveable which
persists them across process death; change their callers to use remember instead
of rememberSaveable so these values remain in-memory only and are not serialized
into a Bundle; leave non-sensitive fields (e.g., draftPairingCode, savedBaseUrl,
savedPairingCode) as-is, and if persistence is required later migrate these
secrets to an encrypted storage mechanism rather than rememberSaveable.
- Around line 156-160: The ChatWorkspaceActions object is being memoized with
remember which freezes callbacks like onSend = ::sendMessage and prevents
sendMessage from seeing updates to savedGatewayConfig when onSaveGatewayConfig
runs; remove the remember wrapper around the ChatWorkspaceActions creation so
the actions instance (ChatWorkspaceActions with onQueryChange, onSend,
onToggleConfig, etc.) is recreated on each recomposition, letting sendMessage
capture current savedGatewayConfig and other state (e.g., showConfig) instead of
holding a stale closure.

---

Duplicate comments:
In
`@clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/chat/ChatWorkspace.kt`:
- Around line 165-167: The current onTestConnection handler only sets
isGatewayConfigured via isGatewayConfigConfigured (which merely checks URL
scheme), so it falsely reports success for unreachable hosts; update
onTestConnection in ChatWorkspace to perform an actual connectivity probe (e.g.,
HTTP GET to config.baseUrl + "/health" or another agreed health endpoint) and
set isGatewayConfigured true only when the probe returns a successful response
(200-range) and false on non-2xx or exceptions; use the existing
isGatewayConfigConfigured as a quick-syntax check first, then attempt the
network probe (catching and logging errors) before flipping isGatewayConfigured,
or alternatively rename the action and UI label to reflect it only validates URL
format (e.g., validateGatewayUrl) if you prefer not to perform network I/O.
🪄 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 87cff6c9-a414-4870-b05e-290092f95183

📥 Commits

Reviewing files that changed from the base of the PR and between 4824bbf and 681c973.

📒 Files selected for processing (7)
  • clients/agent-runtime/src/peripherals/uno_q_bridge.rs
  • clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/chat/ChatComponents.kt
  • clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/chat/ChatWorkspace.kt
  • clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/chat/ConfigPanel.kt
  • clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/onboarding/OnboardingScreen.kt
  • clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/theme/Color.kt
  • clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/theme/Theme.kt
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: sonar
  • GitHub Check: pr-checks
  • GitHub Check: pr-checks
  • GitHub Check: Cloudflare Pages
🧰 Additional context used
📓 Path-based instructions (5)
clients/agent-runtime/src/**/*.rs

📄 CodeRabbit inference engine (clients/agent-runtime/AGENTS.md)

clients/agent-runtime/src/**/*.rs: Never log secrets, tokens, raw credentials, or sensitive payloads in any logging statements
Avoid unnecessary allocations, clones, and blocking operations to maintain performance and efficiency

Files:

  • clients/agent-runtime/src/peripherals/uno_q_bridge.rs
clients/agent-runtime/**/*.rs

📄 CodeRabbit inference engine (clients/agent-runtime/AGENTS.md)

Run cargo fmt --all -- --check, cargo clippy --all-targets -- -D warnings, and cargo test for code validation, or document which checks were skipped and why

Files:

  • clients/agent-runtime/src/peripherals/uno_q_bridge.rs
**/*.rs

⚙️ CodeRabbit configuration file

**/*.rs: Focus on Rust idioms, memory safety, and ownership/borrowing correctness.
Flag unnecessary clones, unchecked panics in production paths, and weak error context.
Prioritize unsafe blocks, FFI boundaries, concurrency races, and secret handling.

Files:

  • clients/agent-runtime/src/peripherals/uno_q_bridge.rs
**/*

⚙️ CodeRabbit configuration file

**/*: Security first, performance second.
Validate input boundaries, auth/authz implications, and secret management.
Look for behavioral regressions, missing tests, and contract breaks across modules.

Files:

  • clients/agent-runtime/src/peripherals/uno_q_bridge.rs
  • clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/onboarding/OnboardingScreen.kt
  • clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/chat/ChatWorkspace.kt
  • clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/theme/Theme.kt
  • clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/theme/Color.kt
  • clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/chat/ConfigPanel.kt
  • clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/chat/ChatComponents.kt
**/*.kt

⚙️ CodeRabbit configuration file

**/*.kt: Enforce null safety (no !!), structured concurrency, and non-blocking suspend code.
Prefer idiomatic Kotlin (expression bodies, sealed types, value classes when justified).
Verify tests follow TDD intent and use backtick test names where applicable.

Files:

  • clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/onboarding/OnboardingScreen.kt
  • clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/chat/ChatWorkspace.kt
  • clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/theme/Theme.kt
  • clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/theme/Color.kt
  • clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/chat/ConfigPanel.kt
  • clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/chat/ChatComponents.kt
🧠 Learnings (2)
📚 Learning: 2026-02-17T12:31:17.076Z
Learnt from: CR
Repo: dallay/corvus PR: 0
File: clients/agent-runtime/AGENTS.md:0-0
Timestamp: 2026-02-17T12:31:17.076Z
Learning: Applies to clients/agent-runtime/src/main.rs : Preserve CLI contract unless change is intentional and documented; prefer explicit errors over silent fallback for unsupported critical paths

Applied to files:

  • clients/agent-runtime/src/peripherals/uno_q_bridge.rs
📚 Learning: 2026-02-17T12:31:17.076Z
Learnt from: CR
Repo: dallay/corvus PR: 0
File: clients/agent-runtime/AGENTS.md:0-0
Timestamp: 2026-02-17T12:31:17.076Z
Learning: Applies to clients/agent-runtime/src/tools/**/*.rs : Implement `Tool` trait in `src/tools/` with strict parameter schema, validate and sanitize all inputs, and return structured `ToolResult` without panics in runtime path

Applied to files:

  • clients/agent-runtime/src/peripherals/uno_q_bridge.rs
🪛 GitHub Actions: Scan with Detekt
clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/onboarding/OnboardingScreen.kt

[error] 96-96: detekt-cli [LongParameterList]: The function OnboardingScreen has too many parameters. Current threshold is set to 6.


[error] 96-96: detekt-cli [LongMethod]: The function OnboardingScreen is too long (75). The maximum length is 60.


[error] 96-96: detekt-cli [FunctionNaming]: Function name does not match pattern: [a-z][a-zA-Z0-9]*.


[error] 203-203: detekt-cli [FunctionNaming]: Function name does not match pattern: [a-z][a-zA-Z0-9]*.


[error] 251-251: detekt-cli [FunctionNaming]: Function name does not match pattern: [a-z][a-zA-Z0-9]*.


[error] 270-270: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 277-277: detekt-cli [MagicNumber]: This expression contains a magic number.

clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/chat/ChatWorkspace.kt

[error] 86-86: detekt-cli [LongMethod]: The function ChatWorkspace is too long (81). The maximum length is 60.

clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/theme/Theme.kt

[error] 272-272: detekt-cli [FunctionNaming]: Function name does not match pattern: [a-z][a-zA-Z0-9]*.


[error] 37-37: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 38-38: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 39-39: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 40-40: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 41-41: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 42-42: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 43-43: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 44-44: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 45-45: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 47-47: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 48-48: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 50-50: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 57-57: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 61-61: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 65-65: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 66-66: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 68-68: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 69-69: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 70-70: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 71-71: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 72-72: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 73-73: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 75-75: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 76-76: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 78-78: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 239-239: detekt-cli [MagicNumber]: This expression contains a magic number.

clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/theme/Color.kt

[error] 13-13: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 14-14: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 15-15: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 17-17: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 18-18: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 19-19: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 27-27: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 28-28: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 29-29: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 30-30: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 31-31: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 59-59: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 60-60: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 76-76: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 77-77: detekt-cli [MagicNumber]: This expression contains a magic number.

clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/chat/ConfigPanel.kt

[error] 88-88: detekt-cli [LongMethod]: The function ConfigSettingsList is too long (144). The maximum length is 60.


[error] 59-59: detekt-cli [FunctionNaming]: Function name does not match pattern: [a-z][a-zA-Z0-9]*.


[error] 88-88: detekt-cli [FunctionNaming]: Function name does not match pattern: [a-z][a-zA-Z0-9]*.


[error] 249-249: detekt-cli [FunctionNaming]: Function name does not match pattern: [a-z][a-zA-Z0-9]*.

clients/composeApp/src/commonMain/kotlin/com/profiletailors/corvus/ui/chat/ChatComponents.kt

[error] 1-1: detekt-cli [TooManyFunctions]: File has 12 functions; threshold inside files is set to 11.


[error] 66-66: detekt-cli [FunctionNaming]: Function name does not match pattern: [a-z][a-zA-Z0-9]*.


[error] 87-87: detekt-cli [FunctionNaming]: Function name does not match pattern: [a-z][a-zA-Z0-9]*.


[error] 129-129: detekt-cli [FunctionNaming]: Function name does not match pattern: [a-z][a-zA-Z0-9]*.


[error] 153-153: detekt-cli [FunctionNaming]: Function name does not match pattern: [a-z][a-zA-Z0-9]*.


[error] 178-178: detekt-cli [FunctionNaming]: Function name does not match pattern: [a-z][a-zA-Z0-9]*.


[error] 188-188: detekt-cli [FunctionNaming]: Function name does not match pattern: [a-z][a-zA-Z0-9]*.


[error] 236-236: detekt-cli [FunctionNaming]: Function name does not match pattern: [a-z][a-zA-Z0-9]*.


[error] 306-306: detekt-cli [FunctionNaming]: Function name does not match pattern: [a-z][a-zA-Z0-9]*.


[error] 339-339: detekt-cli [FunctionNaming]: Function name does not match pattern: [a-z][a-zA-Z0-9]*.


[error] 101-101: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 311-311: detekt-cli [MagicNumber]: This expression contains a magic number.


[error] 317-317: detekt-cli [MagicNumber]: This expression contains a magic number.

🔇 Additional comments (4)
clients/agent-runtime/src/peripherals/uno_q_bridge.rs (4)

16-23: Good extraction for consistent argument validation.

Nice centralization of missing-vs-invalid argument errors; this removes duplicated parsing logic and keeps error text consistent.


69-69: Read path now correctly reuses shared parser.

This aligns gpio_read validation behavior with gpio_write and improves type-safety/error clarity.


181-188: Solid regression test for invalid pin type on read.

This directly validates the new explicit "Invalid 'pin' type" behavior.


213-223: Good coverage for invalid pin type on write path.

This test confirms the write tool now returns the same explicit type error for malformed pin.

Comment thread clients/agent-runtime/src/peripherals/uno_q_bridge.rs
Apply Spotless formatting to the dependency locking helper so the pre-push Gradle checks pass cleanly.
Stop locking composeApp desktop metadata configurations that resolve OS-specific Compose desktop artifacts so gradle.lockfile stays stable across macOS and Linux CI runs.
@sentry
Copy link
Copy Markdown

sentry Bot commented Mar 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@yacosta738 yacosta738 added this to the v1.0.0 milestone Mar 21, 2026
@sonarqubecloud
Copy link
Copy Markdown

@yacosta738 yacosta738 merged commit 6c84864 into main Mar 21, 2026
21 checks passed
@yacosta738 yacosta738 deleted the fix/253-improve-sonarqube-coverage-in-the-highest-impact-uncovered-files branch March 21, 2026 09:36
@yacosta738 yacosta738 mentioned this pull request Mar 21, 2026
@dallay-bot dallay-bot Bot mentioned this pull request Apr 9, 2026
@dallay-bot dallay-bot Bot mentioned this pull request May 3, 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.

1 participant