feat(workspace): add invite reward hint - #363
Merged
huyanxius merged 6 commits intoAug 18, 2026
Merged
Conversation
Users may not discover invite rewards from the account center without a contextual entry point. Show a restrained account-adjacent hint once per login session, dismiss it on account-menu open or close, and expire it after fifteen seconds. Clear the session marker on logout so the next login can discover the reward again.
Reviewers need stable visual evidence for the contextual invitation entry point. Add desktop and mobile captures of the account-adjacent reward hint from the local workspace. Keep both responsive states available for direct PR review.
|
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Acceptance found that route changes could repeat the hint and non-header logout paths could suppress it on the next login. Mark the hint as seen when shown, clear the marker for every guest transition, and link directly to the invite section. Cover timeout, close, route changes, external logout, and responsive evidence format.
Protected routes can unmount the header before a guest-state effect clears the invite hint marker. Move session-scoped storage cleanup into the shared authentication teardown used by logout, expiry, password changes, and cross-tab logout. Replace the header-only false positive with provider-level lifecycle coverage.
The session-scoped storage boundary must preserve unrelated preferences and tolerate unavailable browser storage. Cover prefixed-key removal, null storage, and storage access failures directly. Raise patch coverage for the lifecycle fix without broadening production behavior.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Collaborator
Author
|
@fennoai 请把你的问题直接修改,修改完成后 用一个干净的子代理验收,验收完后直接 commit 到本 PR |
Contributor
修改完成
|
Contributor
PASS
|
xiaocheny214
added a commit
to xiaocheny214/DireSoul
that referenced
this pull request
Aug 18, 2026
邀请奖励页和工作台提示已分别由 1024XEngineer#362、1024XEngineer#363 承担,本 PR 只保留后端接口与 OpenAPI。
minorcell
reviewed
Aug 18, 2026
Member
|
处理下 review 的内容。去掉图片。 |
Contributor
Review 已处理
|
Collaborator
Author
🫡下次一定记住 |
…260818 chore(workspace): remove invite hint screenshots
minorcell
approved these changes
Aug 18, 2026
Member
|
@huyanxius 邀请码的设计有点问题;等等 @xiaocheny214 的那个重新设计和合并吧。 |
minorcell
pushed a commit
that referenced
this pull request
Aug 18, 2026
* feat(auth): 用邀请码重新开放注册 公开注册仍关闭自动建号,改为邀请码门槛,并补齐查看、轮换和补填邀请码接口。 Closes #355 * test: 补齐邀请码注册与兑换的失败路径覆盖 覆盖空邀请码、发码碰撞、兑换接口以及账号中心邀请码加载/生成失败。 * fix(account): 兑换邀请码后刷新积分余额和流水 兑换成功只改了提示,同页余额与流水会停在旧数据。 * revert(frontend): 把邀请码 UI 交还给账号中心与工作台 PR 邀请奖励页和工作台提示已分别由 #362、#363 承担,本 PR 只保留后端接口与 OpenAPI。 * fix(quota): 轮换邀请码加行锁,重复兑换改为业务错误 冷启动不加兑换次数上限。并发轮换用 FOR UPDATE 串行化;invitee 唯一约束冲突返回已填写过邀请码。邀请双方奖励默认改为 200,与账号中心 PR 对齐。 * fix(auth): 邀请码校验对齐邀请链接字符集 注册不再返回「请填写邀请码」:前端从链接传入 invite_code,空码和非法字符统一为邀请码无效。 * feat(auth): 邀请码选填,验证码登录可建号 注册无邀请码只发注册赠送;有有效邀请码再发双方奖励。login-by-code 对未知邮箱建号。注册赠送默认改为 300,邀请奖励保持 200。 * feat(auth): 邀请码仅注册可用,改为 TTL 与只增不删 去掉登录后补填;邀请码 30 天过期,轮换插入新行并截断旧码有效期。 * feat(quota): 邀请人每日最多 3 次邀请奖励 未过期邀请码仍可继续被使用并写入关系;邀请人每个 UTC 日最多入账 600 分,超出只跳过邀请人奖励。 * chore(openapi): 按导出脚本排序 InviteCodeOut 字段
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.
本 PR 在工作台账号入口旁增加一次性邀请奖励气泡,让用户在不打断当前创作流程的情况下发现账号中心的邀请奖励。
Why
邀请奖励只放在账号中心时几乎不可发现;常驻横幅又会遮挡工作区。需要一个靠近账号入口、低对比、短时存在的发现提示。
Changes
/workspace账号入口旁显示轻量气泡,明确双方各得 200 积分。Implementation
sessionStorage记录是否已看过提示,并由统一clearSession边界在登出、过期、改密或跨标签退出时清理。Verification
npm exec vitest run --passWithNoTests src/app/layout/app-header.test.tsx src/features/auth-session/index.test.tsx src/features/auth-session/session-storage.test.ts:53 passednpm run typecheck:通过Scope
Related Issues
Refs #357
Closes #359