Skip to content

fix(session): hide session pill when only one session is registered#12

Open
johnkferguson wants to merge 1 commit into
xCaptaiN09:mainfrom
johnkferguson:fix/hide-single-session-pill
Open

fix(session): hide session pill when only one session is registered#12
johnkferguson wants to merge 1 commit into
xCaptaiN09:mainfrom
johnkferguson:fix/hide-single-session-pill

Conversation

@johnkferguson
Copy link
Copy Markdown

The session pill renders unconditionally, even when sessionModel.count is 1. The "▾" caret already hides in that case (Main.qml:551), but the pill itself doesn't — so it sits there showing a session you can't switch away from.

One-line fix: bind sessionPill.visible to count > 1. The defensive typeof sessionModel !== "undefined" half matches the existing style in the same block (the inner Text { text: ... } does the same check).

The session pill renders unconditionally, even when sessionModel.count
is 1 — wasted UI since there's nothing to switch to. The "▾" caret
already hides in that case (Main.qml:551), but the pill itself doesn't.

Bind sessionPill.visible to (count > 1). When hidden, the ColumnLayout
drops the item and its spacing, leaving a small amount of empty space
at the bottom of the card (the loginCard height is still hardcoded).
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates Main.qml to conditionally display the sessionPill element. It is now only visible when sessionModel is defined and contains more than one item. I have no feedback to provide.

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