Files
MemRelay/projects/280dd2a0-d23d-4a71-91e1-dce4353163be/Checkpoint 2026-09-26 19-28-21 UTC [6e08be9ef0].md
T
memrelay c9f6811f05 create: Checkpoint 2026-09-26 19:28:21 UTC [6e08be9ef0]
MemRelay-Operation: checkpoint-save:checkpoint-profile-poller-20260927
MemRelay-Resource: 1b76566d-5609-4789-a6c9-6dea45488783
2026-09-27 03:28:24 +08:00

26 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: Checkpoint 2026-09-26 19:28:21 UTC [6e08be9ef0]
type: checkpoint
permalink: main/projects/280dd2a0-d23d-4a71-91e1-dce4353163be/checkpoint-2026-09-26-19-28-21-utc-6e08be9ef0
stable_id: 1b76566d-5609-4789-a6c9-6dea45488783
scope: project
memory_type: checkpoint
project_id: 280dd2a0-d23d-4a71-91e1-dce4353163be
usage_profile_id: 0c9feb46-d06e-43cd-9ef0-c5813c84a998
status: active
revision: 1
request_id: checkpoint-profile-poller-20260927
created_at: '2026-09-26T19:28:21.186547+00:00'
updated_at: '2026-09-26T19:28:21.186547+00:00'
tags:
- profile
- sidebar
---
完成:侧栏下方是当前用户(头像和昵称),点击进入个人信息页。页面显示头像、用户名和退出图标,右上角退出已去掉。后台线程每 15 秒调用 getUserInfo,页面每 3 秒读本地缓存并更新。退出会停掉该线程。
原因:退出放到用户页,并用定时读取个人信息保持 token 有效。
关键实现:server/services/profile_poller.py 守护线程,登录或 /api/me 后 ensure;GET /api/profile 只读缓存;POST /api/logout 停线程并清会话。侧栏用 flex 把用户项顶在底部。
验证:短间隔单测能更新并在 stop 后停止。浏览器登录后侧栏底部是头像和昵称,个人信息页有头像、名称、退出图标和原有字段;点退出回到登录页。缓存 revision 在约 15 秒后增加。
问题:同一后端只保活最后一次登录的 token。游客登录每次都会新建账号。
下一步:下载目录和下载按钮仍按用户后续要求再做。不要填 Trending Now,不要改 rapt_scraper.py。
给下个会话:窗口在 http://127.0.0.1:65494/ 。未提交。不要把 token、邮箱密码或代理密码写进记忆。