openpencil/crates/openpencil-shell-core/src
Kayshen-X 4d963fd018 refactor(variables): split tests to sibling file (codex cap fix)
Codex stop-gate flagged that `document/variables.rs` was 865 lines
after the three rounds of `set_color_hex` correctness fixes — over
the project's 800-line ceiling. Tests moved verbatim to a sibling,
mirroring the `layer_panel_tests` / `property_panel_tests` pattern.

  crates/openpencil-shell-core/src/document/variables.rs       865 → 318
  crates/openpencil-shell-core/src/document/variables_tests.rs (new) 549

`document.rs` registers the sibling under `#[cfg(test)]` between
the existing `mod variables;` and the rest of the file's mod list.

Tests file gets a flat layout — bare `#[test]` functions at file
scope (no inner `mod tests {}` wrapper), `use super::*` removed in
favor of the explicit `use super::{ThemedValue, Variable, ...}`
imports the body actually needs.

No semantic change. 290 shell-core tests pass.
2026-05-14 18:49:06 +08:00
..
document refactor(variables): split tests to sibling file (codex cap fix) 2026-05-14 18:49:06 +08:00
i18n feat(shell): editor v0.8.0 batch — layer panel, pen, color picker, brand icons, settings modal, corner radius, perf 2026-05-12 21:26:27 +08:00
mcp feat(mcp): get_node surfaces fill_ref + stroke_ref from var_table 2026-05-14 18:27:46 +08:00
widgets chore(format): strip trailing blank lines at EOF (codex diff-check fix) 2026-05-14 18:14:19 +08:00
agent_settings_state.rs feat(shell): canonical .op loader + jian-core layout + visual fidelity pass 2026-05-14 09:26:08 +08:00
chat_provider.rs fix(desktop/chat): address codex review BLOCKs + CONCERNs on chat backend trio 2026-05-14 16:16:24 +08:00
codegen.rs feat(shell-core/variables): stroke_refs + set_active_theme — #5 toward 100% 2026-05-14 15:47:56 +08:00
document.rs refactor(variables): split tests to sibling file (codex cap fix) 2026-05-14 18:49:06 +08:00
figma.rs feat(shell-core/figma): FigmaClipboardNode::to_node — convert clipboard entries to Document nodes 2026-05-14 15:54:53 +08:00
jian.rs style(shell): convert all comments to English 2026-05-05 21:12:00 +08:00
lib.rs feat(shell): chat_provider trait + figma file-format detection 2026-05-14 15:09:22 +08:00
mcp.rs feat(mcp): get_node surfaces fill_ref + stroke_ref from var_table 2026-05-14 18:27:46 +08:00
render_backend.rs feat(shell): canonical .op loader + jian-core layout + visual fidelity pass 2026-05-14 09:26:08 +08:00
theme.rs feat(shell-core): canvas surface, slimmer toolbar, TS-style chat input 2026-05-10 19:33:06 +08:00