Skip to content

feat(account): show local signed-in identity in Account pane (#136)#1435

Merged
jaylfc merged 1 commit into
devfrom
feat/account-local-identity
Jun 25, 2026
Merged

feat(account): show local signed-in identity in Account pane (#136)#1435
jaylfc merged 1 commit into
devfrom
feat/account-local-identity

Conversation

@jaylfc

@jaylfc jaylfc commented Jun 25, 2026

Copy link
Copy Markdown
Owner

What

Adds a 'this device' identity card at the top of Settings -> Account, sourced from /auth/status, showing the local username / full name / email / admin flag. Renders independently of the taos.my cloud account, so you can always see who you are signed in as even when the cloud account is unreachable.

Why

Jay 2026-06-25: 'I dont know what account I am in, it doesnt show me anywhere.' The pane only fetched the cloud account (account-client -> taos.my); the local identity from /auth/status was never surfaced. (Also confirms the password-only login is the single-primary-account model, so the earlier 'new account' was a password reset, not a duplicate.)

Scope

Frontend only. Card renders nothing when signed out (401) or the host is unreachable. Cloud-account copy reworded to 'cloud account' for the two-tier distinction.

Tests

New test: local identity shows even while the cloud account is unreachable. Existing AccountPanel tests made URL-aware (the local probe must not consume the cloud mock's single-use Response body). 5/5 green.

…136)

The Account pane only ever talked to the taos.my cloud account, so when that
service is unreachable nothing on screen tells you who you are signed in as on
this device. Add a 'this device' card sourced from /auth/status that renders the
local username/full name/email independently of cloud reachability, and clarify
the cloud copy. Renders nothing when signed out or the host is unreachable.
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@jaylfc, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 36 minutes and 48 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 83d1b477-2d89-4d7a-8afe-e059789a67e2

📥 Commits

Reviewing files that changed from the base of the PR and between 00116e9 and b65ac05.

📒 Files selected for processing (2)
  • desktop/src/apps/SettingsApp/AccountPanel.test.tsx
  • desktop/src/apps/SettingsApp/AccountPanel.tsx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/account-local-identity

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.

@gitar-bot

gitar-bot Bot commented Jun 25, 2026

Copy link
Copy Markdown

Note

Your trial team has used its Gitar budget, so automatic reviews are paused. Upgrade now to unlock full capacity. Comment "Gitar review" to trigger a review manually.
Learn more about usage limits

Code Review ✅ Approved

Integrates the local identity card into the Account pane using /auth/status to ensure user visibility even when the cloud account is unreachable. No issues found in the implementation or updated tests.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Important

Your trial ends in 2 days — upgrade now to keep code review, CI analysis, auto-apply, custom automations, and more.

Was this helpful? React with 👍 / 👎 | Gitar

const data = await res.json();
if (mounted.current && data?.authenticated && data?.user) setUser(data.user);
} catch {
// Host unreachable; the cloud card surfaces connectivity, so stay quiet.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

WARNING: Empty catch silently swallows ALL errors, not just host-unreachable.

The comment justifies swallowing network failures, but this catch also swallows:

  • JSON parse errors (malformed /auth/status body)
  • CORS / mixed-content errors
  • Unexpected runtime errors thrown by res.json()

If /auth/status returns 200 with invalid JSON, the user sees no local-identity card and no diagnostic — the cloud card may also be down, leaving them with zero information about who they're signed in as. Consider splitting: explicitly handle fetch rejection (stay quiet), but log/track res.json() failures so a broken endpoint doesn't render the feature invisible.

(async () => {
try {
const res = await fetch("/auth/status", { credentials: "include" });
if (!res.ok) return;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

WARNING: fetch is not aborted when the component unmounts.

mounted.current is checked before setUser, but the fetch itself continues to completion after unmount — parsing the body and burning bandwidth needlessly. If the user navigates away from Settings while the request is in flight, the response is still read. Use an AbortController and pass signal to fetch, then abort in the unmount cleanup.


if (!user) return null;
const name = user.full_name?.trim() || user.username || "Signed in";
const meta = [

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

SUGGESTION: The "Signed in" fallback is uninformative when both full_name and username are missing.

If /auth/status returns a user with only an email (no full_name, no username, is_admin: false), the card renders literally "Signed in" plus "Signed in on this device" — no identifying information at all. The whole point of this card is to tell the user who they are. Consider falling back to user.email (or rendering just the email in the primary slot) before resorting to the generic label.

@kilo-code-bot

kilo-code-bot Bot commented Jun 25, 2026

Copy link
Copy Markdown

Code Review Summary

Status: 3 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 2
SUGGESTION 1
Issue Details (click to expand)

WARNING

File Line Issue
desktop/src/apps/SettingsApp/AccountPanel.tsx 58 Empty catch silently swallows JSON parse / CORS / runtime errors — not only network failures.
desktop/src/apps/SettingsApp/AccountPanel.tsx 54 fetch is not aborted on unmount; the response is still read after the component goes away.

SUGGESTION

File Line Issue
desktop/src/apps/SettingsApp/AccountPanel.tsx 65 "Signed in" fallback renders no identifying info when both full_name and username are missing; fall back to user.email.
Files Reviewed (2 files)
  • desktop/src/apps/SettingsApp/AccountPanel.tsx - 3 issues
  • desktop/src/apps/SettingsApp/AccountPanel.test.tsx - 0 issues

Fix these issues in Kilo Cloud


Reviewed by minimax-m3 · Input: 43.1K · Output: 5.6K · Cached: 298.7K

@jaylfc jaylfc merged commit 97a5399 into dev Jun 25, 2026
10 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in TinyAgentOS Roadmap Jun 25, 2026
jaylfc added a commit that referenced this pull request Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

1 participant