Skip to content

Use primary Sign in and tuck rail recovery into Help - #1068

Merged
alexeyzimarev merged 3 commits into
mainfrom
nortonandreev/ai-3023-work-context-sign-in-primary
Sep 21, 2026
Merged

alexeyzimarev merged 3 commits into
mainfrom
nortonandreev/ai-3023-work-context-sign-in-primary

Conversation

@nortonandreev

Copy link
Copy Markdown
Contributor

Closes #1067 — AI-3023

What & why

Work-context Sign in used status green; primary CTAs share the near-white primary fill. Rail Sign in left the footer for the help flyout (top, divider under it) so signed-out recovery stays available without a chip beside the status words.

Where to look

WorkContextView Sign in colour; SessionRailView help flyout order when SignInVisible.

Verification

dotnet run --project test/Capacitor.App.Tests.Unit/Capacitor.App.Tests.Unit.csproj -- --treenode-filter '/*/*/WorkContextViewSmokeTests/*Signed_out*'
# Passed! total: 1

dotnet run --project test/Capacitor.App.Tests.Unit/Capacitor.App.Tests.Unit.csproj -- --treenode-filter '/*/*/MainWindowSmokeTests/*sign_in*'
# Passed! total: 1

Green is status-only; primary CTAs share KcapPrimaryBrush / kcapPrimary.
Signed-out recovery lives under Help so the footer stays status + ?.
@linear-code

linear-code Bot commented Sep 21, 2026

Copy link
Copy Markdown

AI-3023

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Use primary Sign in and move rail recovery into Help

🐞 Bug fix ✨ Enhancement 🧪 Tests 🕐 10-20 Minutes

Grey Divider

AI Description

• Styles work-context Sign in with primary CTA colors instead of status green.
• Moves rail Sign in recovery into the signed-out Help flyout.
• Updates smoke tests for flyout behavior and primary styling.
Diagram

graph TD
  VM["Main window VM"] --> Rail["Session rail"] --> Help["Help flyout"] --> Command["Sign in command"] --> Reauth["Re-auth surface"]
  Styles["Primary styles"] --> Context["Work context"] --> Command
  Styles --> Workspace["Workspace reattach"]
Loading
High-Level Assessment

The current approach is appropriately scoped: it reuses the existing Help flyout and sign-in command while applying established primary CTA resources. Keeping a separate footer chip would preserve immediate visibility but conflict with the goal of reserving the rail footer for status, while a dedicated recovery surface would add unnecessary complexity.

Files changed (6) +71 / -49

Enhancement (2) +39 / -38
SessionRailView.axamlMove rail Sign in into the Help flyout +38/-37

Move rail Sign in into the Help flyout

• Removes the signed-out Sign in chip from the status footer. Adds a conditional Sign in item and divider at the top of the Help flyout while leaving the footer focused on connection status.

src/Capacitor.App/Views/SessionRailView.axaml

WorkspaceView.axamlApply shared primary class to Reattach +1/-1

Apply shared primary class to Reattach

• Adds the 'kcapPrimary' class to the existing Reattach button for consistency with other primary actions.

src/Capacitor.App/Views/WorkspaceView.axaml

Bug fix (1) +3 / -3
WorkContextView.axamlApply primary styling to work-context Sign in +3/-3

Apply primary styling to work-context Sign in

• Replaces status-green Sign in styling with the shared primary CTA class, background, and foreground resources.

src/Capacitor.App/Views/WorkContextView.axaml

Tests (2) +24 / -4
MainWindowSmokeTests.csVerify Sign in through the Help flyout +9/-4

Verify Sign in through the Help flyout

• Updates the signed-out rail smoke test to open the Help flyout, verify the ghost-styled Sign in action, execute recovery, and confirm it hides after sign-in.

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

WorkContextViewSmokeTests.csVerify primary signed-out Sign in styling +15/-0

Verify primary signed-out Sign in styling

• Adds smoke coverage confirming the signed-out Sign in button is visible, uses 'kcapPrimary', resolves the primary brush, and no longer uses the success brush.

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

Documentation (1) +5 / -4
MainWindowViewModel.csDocument Help-flyout sign-in visibility +5/-4

Document Help-flyout sign-in visibility

• Updates API documentation to clarify that 'SignInVisible' controls the recovery action inside the Help flyout rather than a rail footer button.

src/Capacitor.App/ViewModels/MainWindowViewModel.cs

@qodo-code-review

qodo-code-review Bot commented Sep 21, 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. Help flyout comment repeats markup ✓ Resolved 📘 Rule violation ⚙ Maintainability
Description
The Signed-out only comment restates the button visibility, divider, and item order expressed
directly by the following markup. Because those properties are already visible in the adjacent
controls, later layout changes can leave this narration stale without documenting any non-obvious
constraint.
Code

src/Capacitor.App/Views/SessionRailView.axaml[205]

+                                        <!-- Signed-out only: recovery leads, then a divider, then help. -->
Relevance

●●● Strong

Recent precedents accept removing comments that merely restate obvious markup or field meaning.

PR-#1063
PR-#904

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Rule 2762993 permits comments only when they document non-obvious, behavior-critical constraints.
The comment at line 205 simply summarizes the sign-in button, divider, and help items directly
represented by the adjacent markup.

Rule 2762993: Restrict comments to documenting non-obvious, behavior‑critical constraints
src/Capacitor.App/Views/SessionRailView.axaml[205-213]

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 help-flyout comment merely describes the immediately following control order and does not document a non-obvious behavioral constraint.

## Fix Focus Areas
- src/Capacitor.App/Views/SessionRailView.axaml[205-205]

## Recommended Fix
Remove the `Signed-out only` comment. Keep the visibility bindings and control order as the self-documenting representation of this layout.

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


Grey Divider

Context sources
✅ Compliance rules (platform): 64 rules
✅ Cross-repo context — repo relationships
Review mode: ⚖️ Balanced: This changes signed-out authentication UI behavior and flyout visibility/order across multiple Avalonia views, view-model bindings, and tests, so it warrants a careful single-pass review.

Grey Divider

Tip of the day
💡 Did you know, you can add REVIEW.md to your repo root and Qodo follows it on every PR

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread src/Capacitor.App/Views/SessionRailView.axaml Outdated
@nortonandreev nortonandreev self-assigned this Sep 21, 2026
@alexeyzimarev
alexeyzimarev merged commit 248137b into main Sep 21, 2026
19 of 22 checks passed
@alexeyzimarev
alexeyzimarev deleted the nortonandreev/ai-3023-work-context-sign-in-primary branch September 21, 2026 13:56
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.

Desktop: work-context Sign in still uses status green

2 participants