Skip to content

fix(identity): make the hub responsive across window sizes - #1094

Merged
lklimek merged 11 commits into
v1.0-devfrom
fix/identity-hub-layout
Oct 19, 2026
Merged

lklimek merged 11 commits into
v1.0-devfrom
fix/identity-hub-layout

Conversation

@Claudius-Maginificent

@Claudius-Maginificent Claudius-Maginificent commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

TL;DR

The identity hub uses the full available window width. Home, Contacts and Profile stay left-aligned, with proportional columns on wide windows and stacked content on narrow windows.

User story

As an everyday user, I want my identity's pages to use the available screen space while keeping names, forms and actions readable.

Scenario

Actual behavior

The Profile layout, contact lists and long-name rows need consistent alignment and responsive sizing. Contact actions can overlap long names, and the same-identity refresh can discard profile edits.

Expected behavior

  • The header, tab bar and content expand with the available window width.
  • Home and Profile use proportional columns on wide windows and stack on narrow windows.
  • Profile groups the social-profile form and usernames card; the identity-type badge appears under Advanced.
  • Contacts offer one add-by-username action, scroll their sections and avoid repeating identical names and handles.
  • Long names truncate without overlapping badges or actions.
  • Refreshing the same identity preserves profile edits; switching identities resets the editor.

Detailed discussion

The hub retains a left-aligned layout without a fixed maximum width. Profile uses a 560:380 column ratio above its responsive breakpoint. Username and contact rows reserve space for actions and truncate their labels. The Profile tab renders from one borrowed identity snapshot per frame.

Contact details and private notes are separate work in #1096, which is based on this PR.

Testing

  • The window-expansion regression failed against the capped layout, then passed after removing the cap.
  • cargo test --locked --all-features --test kittest identity_hub_layout: 8 passed, including wide-window growth, narrow-window stacking and long-name containment.
  • cargo clippy --locked --all-features --lib --test kittest -- -D warnings: passed.
  • cargo fmt --all and git diff --check: passed.
  • This follow-up was verified with headless UI tests; a new live GUI visual pass has not been run.

🤖 Co-authored by Claudius the Magnificent AI Agent

PR Hygiene · 2cc7add

  • Bots — coderabbitai skipped after its own rate limit · thepastaclaw ✓
  • Self-review — not asked of a bot author
  • Build green
  • Approvals
    • files with no dedicated owner (src/ui/components/pill.rs, src/ui/identity/contacts.rs, src/ui/identity/hub_screen.rs and 4 more) — approved by lklimek

When every merge requirement is met, the PR Hygiene check passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.

Summary by CodeRabbit

  • User Interface
    • Updated the identity home screen to align content to the left and use more of the available width.
    • Profile and username sections sit side by side on wider screens and stack on narrower screens.
    • Contact and username rows keep long labels from overlapping actions; contact rows can show a distinct username.
    • The Add by username option appears only when there are no active contacts.
    • Username registration and status actions are more clearly positioned.
  • Bug Fixes
    • Refreshing the selected identity updates its displayed information while preserving edits; switching identities resets the editor.

lklimek and others added 5 commits October 14, 2026 15:10
The Profile tab cloned the hub's identity into an owned value, then cloned
it again to keep the refreshed snapshot when the identity had not changed.
Reconciliation now borrows the incoming identity, compares IDs by
reference, and clones once when it keeps the snapshot. A refresh of the
same identity still replaces the snapshot and keeps unsaved edits; a switch
to another identity still resets the editor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012YneRVSNLhVnGiedWDr3fw
The hub drew every tab inside a centred layout that spanned the whole
window, so on a wide window Home's columns, the Profile form and the
Contacts cards stretched across it. Tab content now starts at the tab bar's
left edge and stops at one shared width taken from the identities
wireframes; the rest of a wide window stays empty.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012YneRVSNLhVnGiedWDr3fw
The Profile tab split its width evenly with a justified layout, so on a wide
window the form stretched, each username's menu floated right after the
name, Get another username spanned the whole column and the identity type
badge sat beside the usernames.

The tab now follows the A08 wireframe: the social profile form beside a
usernames card, split 560:380. Each username's menu sits at the card's right
edge, Get another username is a secondary, card-wide button below a
divider, and the identity type badge moves to Advanced next to the identity
ID. Narrow windows still stack the two columns.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012YneRVSNLhVnGiedWDr3fw
The Contacts tab offered Add by username twice, once in the header and
again inside Active contacts, its sections shrank to their content and did
not scroll, and a contact row showed only one line.

Add by username now appears in the header, and inside Active contacts only
as the empty state's call to action. The sections share the content width
and scroll below the header, and each contact row shows the contact's
@username under its name when that adds something.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012YneRVSNLhVnGiedWDr3fw
The identity header (avatar, name, balance and its actions) still spanned
the whole window while the tab content below it stopped at one width, so on
a wide window the balance and Move to wallet sat far to the right of
everything else. The header, the tab bar and the tab content now share one
left-aligned column of the same width on every tab.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012YneRVSNLhVnGiedWDr3fw
@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Waiting for bot review — coderabbitai ✓ · thepastaclaw not yet. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@github-actions github-actions Bot added the waiting-bots Waiting for the review bots to report on this head label Oct 16, 2026
@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

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 50 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
  • Configuration used: Repository: dashpay/dash-evo-tool/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 87503181-d58f-4dee-9b1f-8779cf70bb56
📥 Commits

Reviewing files that changed from the base of the PR and between 67d3fc3 and 2cc7add.

📒 Files selected for processing: 7
  • src/ui/components/pill.rs
  • src/ui/identity/contacts.rs
  • src/ui/identity/hub_screen.rs
  • src/ui/identity/settings.rs
  • src/ui/identity/usernames_card.rs
  • tests/kittest/identity_hub_layout.rs
  • tests/kittest/main.rs

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: dashpay/dash-evo-tool/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b92c3a79-d348-4679-9389-72df8f4df22a
📥 Commits

Reviewing files that changed from the base of the PR and between 5320dd5 and 67d3fc3.

📒 Files selected for processing: 3
  • src/ui/identity/contacts.rs
  • src/ui/identity/hub_screen.rs
  • tests/kittest/identity_hub_layout.rs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

The identity hub layout now adapts Home, Settings, Contacts, and username controls to available width. Contact rows can display distinct username handles. Settings refreshes the selected identity snapshot while retaining edits on same-ID refreshes and resetting them when the selected identity changes.

Changes: Identity hub

Layer / File(s) Summary
Hub width and Home layout
src/ui/identity/hub_screen.rs, tests/kittest/main.rs, tests/kittest/identity_hub_layout.rs
Home content uses a top-down, left-aligned layout. Layout tests check content bounds and width behavior at multiple window sizes.
Settings layout and identity refresh
src/ui/identity/settings.rs, tests/kittest/identity_hub_layout.rs
Settings uses 560:380 columns when the panel is at least 760 pixels wide and stacks sections at narrower widths. Identity reconciliation refreshes the stored snapshot on same-ID updates without clearing draft edits; switching identities clears the draft.
Username card controls
src/ui/components/pill.rs, src/ui/identity/usernames_card.rs, tests/kittest/identity_hub_layout.rs
Username rows truncate labels beside badges and actions. Registration buttons use distinct kinds for first and additional usernames. Pill text styling and width measurement share the same helper and padding.
Contacts layout and handle display
src/ui/identity/contacts.rs, tests/kittest/identity_hub_layout.rs
Contact sections scroll below the header. Active rows show a distinct, nonblank username handle when available, and the Add by username control appears only when there are no contacts.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 67d3f

The identity hub now expands to fill the available window width instead of being capped at a fixed column width, and the layout tests check that wider behavior. No concrete defect remains. The PR description still mentions the old 1040 px cap and should be updated to match.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 51 functions across 8 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: responsive identity hub layouts across different window sizes.
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.
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • 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.

@thepastaclaw

thepastaclaw commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Final review complete — no blockers (commit 2cc7add) · triage: normal · Phase 2 only (no Phase 1 for this repository)

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Final validation — Phase 2 only (no Phase 1 for this repository)

Verified both supplied findings against head 4132340. Long valid usernames can defeat the Profile tab's new width cap, and the render path still performs two identity clones despite the stated single-clone goal. This was a static review; the supplied CI snapshot reports Test Suite and Clippy passing, with PR Hygiene pending.

🔴 1 blocking | 🟡 1 suggestion(s)

Review provenance

Source: reviewer 1: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: normal by gpt-6.1-sol (effort low) — This is a multi-file UI layout and state-reconciliation change with substantial regression tests, but the diff does not change any critical surface.
  • Phase 1 reviewers: not run (disabled for this repository)
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — rust-quality (completed, effort high); agent phase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.

In `src/ui/identity/usernames_card.rs`:
- [BLOCKING] src/ui/identity/usernames_card.rs:284-287: Constrain username text before positioning the row actions
  The username label immediately above this block is inside a non-wrapping `ui.horizontal`, where egui defaults to extending text rather than wrapping or truncating it. A valid 63-character ASCII username composed of wide letters can exceed the entire new username column before the badge and menu are allocated. The column's `set_width` and hub's `set_max_width` do not prevent child overflow, and the vertical-only ScrollArea explicitly expands its horizontal extent to fit overflowing content. This lets Profile content and its row actions extend past the promised 1040-point boundary on wide windows. Reserve space for the badge/menu and constrain or truncate the label within the remaining width. Add a maximum-length username regression case; the current layout fixtures contain only `alex` and `alexander`.

In `src/ui/identity/settings.rs`:
- [SUGGESTION] src/ui/identity/settings.rs:758-764: The Profile render path still clones the identity twice per frame
  `render()` calls `ensure_selected()`, which reaches `incoming.cloned()` here, and then immediately clones the stored snapshot again at line 239 with `self.selected_identity.clone()`. The change reduces the steady-state path from three full identity clones to two, but does not achieve the PR's explicit single-clone-per-frame goal. Render from the incoming borrowed identity after reconciliation, retaining the one owned snapshot needed for result attribution. That reference already comes from outside `self`, so it does not require cloning the stored snapshot to call the tab's mutable rendering methods.

Comment thread src/ui/identity/usernames_card.rs Resolved
Comment thread src/ui/identity/settings.rs Resolved
@github-actions github-actions Bot added waiting-self-review Waiting for the author to post /self-reviewed and removed waiting-bots Waiting for the review bots to report on this head labels Oct 16, 2026
lklimek and others added 2 commits October 16, 2026 08:17
A username can be 63 characters long. In the Profile tab's usernames card
the name sat in a row that grows to fit its text, so a long name pushed the
Main badge and the ••• menu out of the card and the whole tab past its
content width. A hidden contact with a long name did the same to its Unhide
button.

These rows now lay out their actions first and shorten the name with "…"
to the room that is left, keeping room for the Main badge; hovering shows
the full name. Pending and finished username requests use the same layout.
Active contact rows already wrap long names and are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012YneRVSNLhVnGiedWDr3fw
The Profile tab cloned the selected identity twice per frame: once to keep
its snapshot and again to render from it. It now renders from the identity
the hub lends it and keeps the one owned snapshot only for attributing
results, so steady-state frames clone it once. The profile-cache lookup
borrows the snapshot as well.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012YneRVSNLhVnGiedWDr3fw
@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Waiting for bot review — coderabbitai not yet · thepastaclaw requested changes — dismiss the review or push a fix, 2 threads unresolved — resolve them. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@github-actions github-actions Bot added waiting-bots Waiting for the review bots to report on this head and removed waiting-self-review Waiting for the author to post /self-reviewed labels Oct 16, 2026

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Re-review — Final validation — Phase 2 only (no Phase 1 for this repository)

Verified the Phase-2 findings against head 5320dd5 and the cached egui 0.35 implementation. Both prior findings are fixed, but two in-scope layout defects remain: the width cap expands narrow layouts, and long active-contact labels can overlap their actions. This was a static review; no builds or tests were run, and Clippy and Test Suite were queued in the supplied CI snapshot.

🔴 2 blocking

Review provenance

Source: reviewer 1: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: normal by gpt-6.1-sol (effort low) — This is a multi-file UI behavior and layout change with substantial regression coverage, but the diff does not change any critical surface.
  • Phase 1 reviewers: not run (disabled for this repository)
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — rust-quality (completed, effort high); agent phase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.

In `src/ui/identity/hub_screen.rs`:
- [BLOCKING] src/ui/identity/hub_screen.rs:559: Clamp the content width to the available window space
  In egui 0.35, set_max_width replaces the child's horizontal constraint rather than taking the minimum of the requested width and the existing available width. When the island has less than 1040 points available, this call therefore expands the hub beyond the viewport, allowing the header and right-hand actions to be clipped. Profile also continues to see a width above its 760-point stacking breakpoint instead of switching to the narrow layout. Clamp the cap against ui.available_width(), and add a regression with less than 760 points available to the tab; the existing 1280- and 2000-point fixtures do not cover this case.

In `src/ui/identity/contacts.rs`:
- [BLOCKING] src/ui/identity/contacts.rs:503-516: Reserve action space before laying out active-contact labels
  The new vertical label block lays out its name and handle against the entire available row width before allocating View Profile and the optional Pay button. Vertical labels wrap by default, so a long nickname can occupy almost the full card width. The subsequent right-to-left action UI then has insufficient space and lays its buttons leftward over the text. This differs from the corrected hidden-contact and username rows, which allocate action space first. Reserve the action width before rendering the text, truncate both labels within the remaining space with full text on hover, and assert separation between the text and action rectangles. The current long-contact regression checks button containment only, so it does not detect this overlap.

Comment thread src/ui/identity/hub_screen.rs Resolved
Comment thread src/ui/identity/contacts.rs Resolved
@github-actions github-actions Bot added waiting-self-review Waiting for the author to post /self-reviewed and removed waiting-bots Waiting for the review bots to report on this head labels Oct 16, 2026
lklimek and others added 2 commits October 16, 2026 08:29
The hub's content column was given the content width as its width, but
egui's set_max_width sets the width instead of capping it. In a window
narrower than that the column grew past the window: the header's balance
and actions were cut off, and the Profile tab never had little enough room
to stack its usernames card under the form. The column now takes the
smaller of the content width and the room the window has.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012YneRVSNLhVnGiedWDr3fw
An active contact's name and username were laid out across the whole row
before View Profile and Pay, so a long nickname wrapped under the buttons.
The buttons are now laid out first and the name and username are shortened
with "…" to the room they leave; hovering shows the full text, the same as
hidden contacts and usernames.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012YneRVSNLhVnGiedWDr3fw
@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Waiting for bot review — coderabbitai not yet · thepastaclaw ✓. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@github-actions github-actions Bot added waiting-bots Waiting for the review bots to report on this head and removed waiting-self-review Waiting for the author to post /self-reviewed labels Oct 16, 2026

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Re-review — Final validation — Phase 2 only (no Phase 1 for this repository)

Independently reviewed the complete PR diff at 4b980d8 and verified all four prior findings against the current source and relevant egui implementation. All four are fixed, and no additional actionable in-scope issues were identified. Validation was static only; the supplied CI snapshot has the Test Suite and Platform pin guard queued and Clippy in progress, so this approval does not assert passing build or test results.

🔴 0 blocking | 🟡 0 suggestion(s) | 💬 0 nitpick(s)

Review provenance

Source: reviewer 1: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 4: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: normal by gpt-6.1-sol (effort low) — This is a multi-file UI layout and state-reconciliation change with substantial regression coverage, but the diff does not change any critical surface.
  • Phase 1 reviewers: not run (disabled for this repository)
  • Fresh final gate: an independent Phase-2 review ran after iterative findings were reconciled
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — rust-quality (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — general (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — rust-quality (completed, effort high); agent phase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify the current code and confirm that no unresolved issues remain.

No unresolved findings remain from the prior review on this head.

@github-actions

Copy link
Copy Markdown
Contributor

Ready for review — files with no dedicated owner: lklimek.
Full checklist in the description.

@github-actions github-actions Bot added ready-for-human Bots have reported, the author has self-reviewed, and the build is green: this needs a human. bot-review-skipped A required review bot did not report; it was skipped by the window or by a person. and removed waiting-bots Waiting for the review bots to report on this head labels Oct 16, 2026
Remove the shared width cap and verify that the header and each tab grow
with the window while narrow layouts and long labels remain contained.

Co-Authored-By: Codex <noreply@openai.com>

<sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub>
@lklimek lklimek changed the title fix(identity): keep the identity hub to one readable column on wide screens fix(identity): make the hub responsive across window sizes Oct 19, 2026
@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Waiting for bot review — coderabbitai ✓ · thepastaclaw not yet. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@github-actions github-actions Bot added waiting-bots Waiting for the review bots to report on this head and removed ready-for-human Bots have reported, the author has self-reviewed, and the build is green: this needs a human. bot-review-skipped A required review bot did not report; it was skipped by the window or by a person. labels Oct 19, 2026
@lklimek
lklimek enabled auto-merge (squash) October 19, 2026 12:38
@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Waiting for bot review — coderabbitai skipped after its own rate limit · thepastaclaw not yet. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@github-actions github-actions Bot added the bot-review-skipped A required review bot did not report; it was skipped by the window or by a person. label Oct 19, 2026

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Re-review — Final validation — Phase 2 only (no Phase 1 for this repository)

The responsive identity-hub changes address the four prior findings and the supplied CI checks pass for the reviewed head. One in-scope UI defect remains: the empty Contacts section renders a second Add by username button even though the header already provides one.

🟡 1 suggestion(s)

Review provenance

Source: reviewer 1: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 4: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: normal by gpt-6.1-sol (effort low) — This is a substantial, cross-cutting UI behavior change spanning identity layout, responsive rendering, state refresh behavior, and extensive tests, but it does not modify a critical surface such as funds, cryptography, networking, or storage migrations.
  • Phase 1 reviewers: not run (disabled for this repository)
  • Fresh final gate: an independent Phase-2 review ran after iterative findings were reconciled
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — rust-quality (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — general (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — rust-quality (completed, effort high); agent phase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.

In `src/ui/identity/contacts.rs`:
- [SUGGESTION] src/ui/identity/contacts.rs:559-568: Empty Contacts view still shows two Add by username buttons
  The Contacts header always renders an Add by username button in `header_row`, while this block renders another one whenever `has_contacts` is false. Therefore an identity with no loaded contacts, including the steady empty state, sees two identical actions. This conflicts with the PR's stated requirement that Contacts offer one add-by-username action. Remove the section-level CTA or make the header and empty-state actions mutually exclusive.

Comment on lines +559 to +568
if !has_contacts {
ui.add_space(8.0);
let add = ui
.add(ComponentStyles::primary_button(ADD_BY_USERNAME_LABEL))
.clickable_tooltip(
"Find someone by their Dash username or identity ID and add them as a contact.",
);
if add.clicked() {
action = resolve_contacts_button(ContactsButton::ActiveAddByUsername, app_context);
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🟡 Suggestion: Empty Contacts view still shows two Add by username buttons

The Contacts header always renders an Add by username button in header_row, while this block renders another one whenever has_contacts is false. Therefore an identity with no loaded contacts, including the steady empty state, sees two identical actions. This conflicts with the PR's stated requirement that Contacts offer one add-by-username action. Remove the section-level CTA or make the header and empty-state actions mutually exclusive.

source: gpt-6.1-sol (phase2-reviewer: general)

@github-actions

Copy link
Copy Markdown
Contributor

Policy satisfied — this can merge.
Full checklist in the description.

@github-actions github-actions Bot removed the waiting-bots Waiting for the review bots to report on this head label Oct 19, 2026
@lklimek
lklimek merged commit d00ba55 into v1.0-dev Oct 19, 2026
11 checks passed
@lklimek
lklimek deleted the fix/identity-hub-layout branch October 19, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot-review-skipped A required review bot did not report; it was skipped by the window or by a person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants