Closed
Conversation
Structured plan for optimizing the Discord section of the Channels page. Current behavior shows 'Loading Discord...' for 2-5s while the backend serially calls Discord REST + CLI. The plan proposes a 3-stage approach: Stage 0: No cache → existing 'Loading' message (unchanged) Stage 1: Fast config-parse data (<50ms) → show guild/channel IDs with spinners Stage 2: Full Discord REST data (2-5s) → resolve all names, remove spinners No code changes in this commit — plan only for review.
Contributor
📊 Test Coverage Report
Coverage measured by |
Collaborator
Author
|
改为基于 feat/recipe-import-library 分支开新 PR,复用已有的 _fast 后端实现。 |
Contributor
📦 PR Build Artifacts
|
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.
概述
优化 Channels 页面 Discord 区域的加载体验。当前用户进入页面后看到
Loading Discord...等待 2-5s,优化后:Stage 0 (无缓存) → 保持现有 Loading 提示
Stage 1 (<50ms) → 立刻展示 guild/channel 列表骨架,未解析的名称显示 ID + ⟳ spinner
Stage 2 (2-5s) → Discord REST 数据到达,补全所有名称,spinner 消失
关键改动
list_discord_guild_channels_fast— 仅解析 config + 磁盘缓存,不调 Discord REST / CLIApp.tsx进入 channels 路由时并发触发 fast + full 两条加载路径Channels.tsxguild/channel 卡片对未解析名称显示 mono ID + Loader2 spinner依赖
建议等 PR #118 (
feat/recipe-import-library) 合入后实施,_fast后端 +discordChannelsResolvedcontext 已在该分支实现。此 PR 仅包含计划文档,无代码改动,供 review 讨论方案。
详见
docs/plans/discord-channels-progressive-loading.md