feat(profile)!: replace sidebar and add avatar navigation

Rename the global Sidebar route, UI, assets, analytics, and payment return context to Profile. Add accessible message-avatar navigation and preserve the source character across auth and logout flows.

BREAKING CHANGE: /sidebar has been removed; use /profile instead.
This commit is contained in:
2026-07-21 18:08:12 +08:00
parent 6cd3a0c2d2
commit 9deb320cf6
67 changed files with 565 additions and 256 deletions
@@ -22,14 +22,14 @@ vi.mock("@/stores/user/user-context", () => ({
}));
describe("CoinsRulesScreen", () => {
it("renders outside CharacterProvider and returns to global sidebar", () => {
it("renders outside CharacterProvider and returns to global profile", () => {
const html = renderToStaticMarkup(
<CoinsRulesScreen returnTo="/characters/maya/chat" />,
);
expect(html).toContain("Coin Usage Rules");
expect(html).toContain(
'href="/sidebar?returnTo=%2Fcharacters%2Fmaya%2Fchat"',
'href="/profile?returnTo=%2Fcharacters%2Fmaya%2Fchat"',
);
});
});
+2 -2
View File
@@ -118,9 +118,9 @@ export function CoinsRulesScreen({ returnTo }: CoinsRulesScreenProps) {
<main className={styles.screen}>
<header className={styles.header}>
<BackButton
href={navigation.sidebarUrl}
href={navigation.profileUrl}
variant="soft"
aria-label="Back to sidebar"
aria-label="Back to profile"
/>
<div className={styles.hero}>