Repository navigation
fix(identity): make the hub responsive across window sizes - #1094
Conversation
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
|
Waiting for bot review — coderabbitai ✓ · thepastaclaw not yet. Wait for the missing reviews, or a writer can post |
|
Warning Review limit reachedYou'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. View limit details
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
|
✅ Final review complete — no blockers (commit 2cc7add) · triage: normal · Phase 2 only (no Phase 1 for this repository) |
thepastaclaw
left a comment
There was a problem hiding this comment.
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:
normalbygpt-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; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— rust-quality (completed, effort high); agentphase2-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.
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
|
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 |
thepastaclaw
left a comment
There was a problem hiding this comment.
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:
normalbygpt-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; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— rust-quality (completed, effort high); agentphase2-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.
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
|
Waiting for bot review — coderabbitai not yet · thepastaclaw ✓. Wait for the missing reviews, or a writer can post |
thepastaclaw
left a comment
There was a problem hiding this comment.
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:
normalbygpt-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; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— rust-quality (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— rust-quality (completed, effort high); agentphase2-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.
|
Ready for review — files with no dedicated owner: lklimek. |
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>
|
Waiting for bot review — coderabbitai ✓ · thepastaclaw not yet. Wait for the missing reviews, or a writer can post |
|
Waiting for bot review — coderabbitai skipped after its own rate limit · thepastaclaw not yet. Wait for the missing reviews, or a writer can post |
thepastaclaw
left a comment
There was a problem hiding this comment.
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:
normalbygpt-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; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— rust-quality (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— rust-quality (completed, effort high); agentphase2-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.
| 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); | ||
| } |
There was a problem hiding this comment.
🟡 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)
|
Policy satisfied — this can merge. |
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
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
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 --allandgit diff --check: passed.🤖 Co-authored by Claudius the Magnificent AI Agent
PR Hygiene ·
2cc7addsrc/ui/components/pill.rs,src/ui/identity/contacts.rs,src/ui/identity/hub_screen.rsand 4 more) — approved by lklimekWhen every merge requirement is met, the
PR Hygienecheck passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.Summary by CodeRabbit