Repository navigation
fix(console): declare account modal loader dependencies - #651
Merged
caigee-cmd merged 2 commits intoDec 4, 2026
Merged
Conversation
Wrap the check-in records and models loaders in useCallback, keep the models pagination size in a ref so changing it does not refetch, and annotate the intentional every-render effects so the new exhaustive-deps rule stays clean. Embedded console assets are regenerated with npm run sync.
caigee-cmd
approved these changes
Dec 4, 2026
caigee-cmd
left a comment
Owner
There was a problem hiding this comment.
已审:真正的逻辑改动只有两个账号弹窗的 loader 改成 useCallback、模型弹窗用 ref 保存最新 pageSize,加上 3 处注释说明。其余 37 个文件是重新构建的嵌入资源,本地 npm run sync 后工作区无差异,资源和源码一致。
一个需要留意的点:.oxlintrc.json 在打开 react/exhaustive-deps 的同时,把 oxlint 默认开启的 react/refs、react/purity、react/set-state-in-effect 三条规则关掉了。main 上这三条目前分别有 90 / 5 / 21 条 warning,这个 PR 之后就看不到了;另外新加的 pageSizeRef.current = pageSize(渲染期间写 ref)本来也会被 react/refs 报出来。建议后续只在需要的地方单独 disable,把这三条恢复。可以合。
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.
Problem
load()from auseEffectand listed only[accountId]; any future loader input would silently read a stale closure.pageSizein the effect while the loader signature took it from state, so changing the page size could refetch or reset the requested size inconsistently.Change
useCallbackand add them to the effect dependencies.AgentQueue/OverviewPageand enablereact/exhaustive-deps(plus the related opt-outs) in.oxlintrc.json.internal/webui/staticwithnpm run sync.Validation
cd frontend && npm run lint(0 errors)cd frontend && npm run syncgit diff --check