Skip to content

app: Show why the local edition is unavailable inside its card - #1883

Open
nortonandreev wants to merge 2 commits into
mainfrom
norton/edition-unavailable-footer
Open

nortonandreev wants to merge 2 commits into
mainfrom
norton/edition-unavailable-footer

Conversation

@nortonandreev

Copy link
Copy Markdown
Contributor

No GitHub or Linear issue

What & why

When the local edition is unavailable, the reason rendered as its own bordered box between the two edition cards, with a different radius, so it read as a third option and was not tied to the card it disables. The reason is now the card's footer under a divider, with an info icon in the card's icon column. The card's head fades to half opacity and the card is disabled, while the footer stays at full contrast. The reason is also the card's automation help text.

Where to look

Both reasons on main (unsupported platform, cloud profile present) use the footer. The cloud card is never unavailable, so it is unchanged. When local is available the step renders identically to before.

Verification

  • Full Capacitor.App.Tests.Unit: 4,241 passed, 10 skipped, 0 failed
  • New An_unavailable_local_card_says_why_in_its_own_footer pins the reason inside the card, the disabled state and the help text

The reason was a separate box between the two edition cards, with its own radius, so it read as a third option. It is now the card's footer under a divider, and the card's head fades while the reason stays legible.
@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 57 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 538bf38d-256d-418f-8f6a-b6f75ea1816b
📥 Commits

Reviewing files that changed from the base of the PR and between 503241d and e122d29.

📒 Files selected for processing: 3
  • src/Capacitor.App/Views/Onboarding/OnboardingPaneView.axaml
  • src/Capacitor.App/Views/Onboarding/OnboardingStyles.axaml
  • test/Capacitor.App.Tests.Unit/EditionStepViewModelTests.cs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Show local edition unavailability reason inside its card

✨ Enhancement 🧪 Tests 🕐 20-40 Minutes

Grey Divider

AI Description

• Move the local unavailability reason into the disabled card so it reads as an explanation, not
 another option.
• Keep the reason legible and expose it as automation help text.
• Test the reason’s placement, visibility, disabled state, and help text.
Diagram

graph TD
  VM["Edition view model"] --> Check{"Local available?"}
  Check -- Yes --> Normal["Standard local card"]
  Check -- No --> Disabled["Disabled local card"] --> Head["Faded card head"]
  Disabled --> Footer["Reason footer"]
  Disabled --> Help["Automation help text"]
Loading
High-Level Assessment

Keep the reason inside the existing card: it directly associates the explanation with the unavailable choice without changing availability logic or the cloud card. The former separate callout was considered but created a misleading third-option appearance.

Files changed (3) +59 / -11

Enhancement (2) +27 / -11
OnboardingPaneView.axamlPlace the local unavailability reason inside its card +19/-11

Place the local unavailability reason inside its card

• Replaces the sibling callout with a conditional, divided footer containing an info icon and the reason. Binds the same reason to the local button’s automation help text; the cloud card is unchanged.

src/Capacitor.App/Views/Onboarding/OnboardingPaneView.axaml

OnboardingStyles.axamlStyle the disabled card head and reason footer +8/-0

Style the disabled card head and reason footer

• Fades only the local card’s head when disabled, leaving the reason legible. Adds footer spacing and separation from the head.

src/Capacitor.App/Views/Onboarding/OnboardingStyles.axaml

Tests (1) +32 / -0
EditionStepViewModelTests.csVerify the unavailable local card’s explanation +32/-0

Verify the unavailable local card’s explanation

• Adds a rendered-window test confirming that the reason is visible inside the disabled local button and matches its automation help text.

test/Capacitor.App.Tests.Unit/EditionStepViewModelTests.cs

@qodo-code-review

qodo-code-review Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Unavailable reasons are faded twice ✗ Dismissed
Description
The explanatory footer is rendered inside a disabled button, so Avalonia's Fluent disabled template
applies its disabled opacity to the footer as well as the card head. When either local-edition
availability check returns a reason, the footer is therefore dimmed and the nested head receives an
additional 0.5 opacity, making the reason less legible than intended.
Code

src/Capacitor.App/Views/Onboarding/OnboardingPaneView.axaml[R20-23]

+                    <StackPanel>
+                        <Grid Classes="onboardingEditionHead" ColumnDefinitions="Auto,*" RowDefinitions="Auto,Auto" ColumnSpacing="14" RowSpacing="4">
+                            <app:AppIcon Kind="Laptop" Size="20" />
+                            <TextBlock Grid.Column="1" Classes="onboardingLabel" VerticalAlignment="Center"
Relevance

●●● Strong

PR intent explicitly keeps the footer legible; disabled-button opacity makes this deterministic
correctness bug actionable.

ⓘ Recommendations generated based on similar findings in past PRs

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The local-unavailable footer is now a descendant of the disabled `LocalEditionButton`. Avalonia's Fluent disabled button template dims that content subtree, so the footer does not stay at full contrast; the head is then dimmed again by its explicit opacity rule.

## Fix Focus Areas
- src/Capacitor.App/Views/Onboarding/OnboardingPaneView.axaml[20-35]
- src/Capacitor.App/Views/Onboarding/OnboardingStyles.axaml[253-260]

## Recommended Fix
Override the disabled `ContentPresenter` opacity for `Button.onboardingEditionCard` so the button content remains at full opacity, then retain the existing 0.5 opacity on `Grid.onboardingEditionHead`. Verify that the footer icon and reason text remain full contrast while the card head is faded and the button remains non-interactive.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. A test comment repeats its assertions ✓ Resolved
Description
The XML comment above An_unavailable_local_card_says_why_in_its_own_footer restates that the
reason is inside the card, exposed as help text, and disables the choice. The test name and
assertions already express this behavior, so the comment adds no constraint or rationale that a
later maintainer needs to preserve.
Code

test/Capacitor.App.Tests.Unit/EditionStepViewModelTests.cs[R188-189]

+    /// The reason is the card's own footer, not a sibling between the two cards, and the card
+    /// carries it as help text while it refuses the choice.
Relevance

●●● Strong

Recent precedent accepts removing XML comments that merely restate test names and assertions.

PR-#1832

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The added comment summarizes the same card placement, help-text, and disabled-state behavior
asserted immediately below, without documenting an invariant, workaround, or other behavior-critical
constraint.

Rule 2762993: Restrict comments to documenting non-obvious, behavior‑critical constraints
test/Capacitor.App.Tests.Unit/EditionStepViewModelTests.cs[188-189]
test/Capacitor.App.Tests.Unit/EditionStepViewModelTests.cs[214-217]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The new XML comment only restates the test name and assertions instead of documenting a non-obvious behavior-critical constraint.

## Fix Focus Areas
- test/Capacitor.App.Tests.Unit/EditionStepViewModelTests.cs[188-189]

## Recommended Fix
Remove the XML comment, or rewrite it to document a specific non-obvious constraint or rationale that is not already clear from the test name and assertions.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context sources
✅ Compliance rules (platform): 59 rules
✅ Cross-repo context — repo relationships
Review mode: Auto: 🚀 Fast: Localized UI and accessibility change with contained behavioral impact.

Grey Divider

Tip of the day
💡 Did you know, you can reply 'qodo' on any finding to push back, ask questions, or dig deeper

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread test/Capacitor.App.Tests.Unit/EditionStepViewModelTests.cs Outdated
Comment thread src/Capacitor.App/Views/Onboarding/OnboardingPaneView.axaml
@nortonandreev nortonandreev self-assigned this Oct 23, 2026
@nortonandreev

Copy link
Copy Markdown
Contributor Author

@CodeRabbit approve

@coderabbitai

coderabbitai Bot commented Oct 23, 2026

Copy link
Copy Markdown
✅ Action performed

Comments resolved and changes approved.

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