Files
ElyOffice/tasks/reviews/C00.3-r1.md
T

3.3 KiB

FAIL

Ran bash tests/scripts/agents-md.sh: exit 0, "agents.md: 115 component names exist". The component library is at b54500b. Every brace-listed name in the map is re-exported from its module's mod.rs, or for theme::{Theme, Mode}, defined in theme/mod.rs. Theme::set_palette exists at theme/mod.rs:163. The gap claims hold. documents/viewer.rs:290 maps every page into the element tree with no culling, which breaks PERF-05 ("不先渲染全部页面"). FixedFormatToolbar holds an Entity<TextInput> (documents/toolbar.rs:82). misc::WebView is a native macOS overlay, not a CEF off-screen view. No formula bar or name box is exported from tables.

tests/scripts/agents-md.sh:28 / agents.md:34 — agents.md says the script "核对下表的每个名字", but the script only extracts module::{...} brace groups. It does not check editor::FindWidget on the Doc row (agents.md:45) or Theme::set_palette (agents.md:52). Scenario: on a scratch copy, changing line 45 to editor::NoSuchWidget or line 52 to Theme::no_such_fn still gives exit 0 and "115 component names exist". Fix: make the script also extract the bare module::Name and Type::method forms in the map, or write every map entry in brace form and stop naming items the script cannot check.

tests/scripts/agents-md.sh:21 — The script greps for pub (struct|enum|fn|trait|type) Name anywhere under the module directory. It does not check that module::Name resolves. This passes items in private submodules and methods inside impl blocks. Scenario: on a scratch copy, adding documents::{..., Mark} and git::{new, ...} gives exit 0 and "117 component names exist". But documents::Mark sits in private mod markdown and is not re-exported, and git::new is only a method (git/review.rs:69). use ely_gpui_component::documents::Mark would not compile. Fix: check each name against the module's public surface, meaning the pub use lists in mod.rs plus items defined in mod.rs itself. Better still, compile a generated use ely_gpui_component::module::{...}; file against the pinned crate.

tests/scripts/agents-md.sh:2 — The comment is eleven words, over the ten-word limit. It also says "is defined", which is the weak property the script checks, not the import path the map promises. Fix: shorten it to ten words or fewer, and state the property the corrected check verifies.

agents.md:34 — TASKS.md C00.3 asks for the gpui rules to be "写入 agents.md". agents.md only says "gpui 用法规则见该仓库 AGENTS.md". That points into reference/, which agents.md:27 marks as not part of this project. The upstream file is 254 lines and mixes library-internal notes (gallery capture harness, wasm build, website) with the rules a consumer must follow. Examples of the latter: ely_gpui_component::init panics unless Assets is passed to with_assets; the root goes in a FocusScope; a state change outside render calls cx.notify() and, during paint, request_animation_frame; overlays go through primitives::raise; uniform_list rows set w_full. Scenario: an implementer of C01.1 reads only agents.md, as the project rules say to, and gets none of these. Fix: write the consumer-facing gpui rules into agents.md, or change the C00.3 line in TASKS.md if delegating to upstream is the decision.