fix(ui): dynamic user nickname in sidebar chip + settings form (rant 2026-08-22T00:01:52) - #113
Merged
Merged
Conversation
…2026-08-22T00:01:52) - ui/index.html: sidebar chip gets ids (side-name / side-avatar), remove hardcoded 阿零; settings nickname input gets id settings-nickname, empty default (was value=阿零 which would overwrite the real name on save) - ui/js/app.js: renderUserChip() fills sidebar name + avatar first char from D.USER.name (fallback email prefix), called from enterApp(); renderSettings() fills the nickname input with the real name - src/db.rs: test-only seed user name '阿零' → 'demo' (no hardcoded nickname left in source) - 136/136 tests + fmt + clippy + node --check clean
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix hardcoded nickname 「阿零」 in the frontend per host rant
2026-08-22T00:01:52(project=aitokenpool). The sidebar chip and the settings nickname input showed a static "阿零" instead of the real user name — and saving the settings form without editing would overwrite the real nickname with "阿零".ui/index.html): the user chip now has ids (#side-name/#side-avatar); the static<strong>阿零</strong>/ avatar零are gonerenderUserChip()(ui/js/app.js): fills the sidebar name withD.USER.name(fallback: email prefix) and the avatar with the name's first character; called fromenterApp()on login and session restoreui/index.html+renderSettings()): the input gets idsettings-nickname, an empty default, and is filled with the real name when the settings view renders — saving can no longer clobber the real nicknamesrc/db.rs): the#[cfg(test)]demo user's name'阿零'→'demo'(no hardcoded nickname left in source)Related Issue
Host rant
2026-08-22T00:01:52.266430+08:00(project=aitokenpool), verbatim:Changes
#side-name= D.USER.name (fallback email prefix), avatar = name first charTests
cargo test— 136/136 passedcargo fmt --check— cleancargo clippy --all-targets -- -D warnings— cleannode --check ui/js/app.js— cleanChecklist
fix/user-chip-nickname)