Skip to content

Commit 642f7b1

Browse files
authored
Test: Improve Test Coverage and Fix Bugs from Coverage Gaps (#201)
1 parent ab6d992 commit 642f7b1

67 files changed

Lines changed: 14075 additions & 489 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AGENTS.md

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -66,37 +66,12 @@
6666
Brilliance is encouraged — share moments of insight and clarity.
6767
</work_process>
6868

69-
<nonobvious_patterns>
70-
These are non-obvious patterns which differ from your training data. Be aware of them when working with the related packages.
71-
72-
Templates:
73-
---
74-
**Flat data context.** Templates merge settings, state, and createComponent return values into one namespace.
75-
`{state.count}` `{settings.name}`
76-
`{count}` `{name}`
77-
78-
**Dual expression syntax.** Lisp-style and JavaScript-style work in the same expression.
79-
❌ Assuming one style excludes the other
80-
`{formatDate date 'h:mm a'}` — Lisp
81-
`{value + 2 * 5}` — JS
82-
`{concat 'hi ' (isNew ? 'new' : 'old')}` — mixed
83-
84-
**Signal auto-unwrapping.** Signals resolve automatically in templates.
85-
`{count.get()}` `{count.value}`
86-
`{count}`
87-
88-
Signals
89-
----------
90-
**Signal mutation methods.** Signals have built-in helpers. Use them directly — never get-mutate-set.
91-
`const arr = state.items.get(); arr.push(x); state.items.set(arr);`
92-
`state.items.push(x)` `state.active.toggle()` `state.count.increment()`
69+
<code_formatting>
70+
*Do not overuse code comments*. Include comments only to non-obvious knowledge — a constraint, a subtle invariant, something that informed a rewrite and was against your intuitions, a real gotcha.
9371

94-
**`{uiClasses}` is a computed class string.** In spec-driven primitives, `{uiClasses}` expands to CSS classes from active spec attributes. It is not a variable.
95-
`<div class="{uiClasses}button">``<div class="primary large button">`
96-
</nonobvious_patterns>
72+
**Stewardship** Open source work comments are highly public, they will be read by others and not just the user you are interacting with in a session. Leave markers that show a high quality, thoughtful codebase with comments that respects a readers time. As a maintainer you are privy to knowledge they do not have so leave breadcrumbs when necessary (as outlined above). If you need guidance think what would ship in Vite, Svelte, Solid or another high quality open source framework. If you prefer not to infer pull <https://github.com/vitejs/vite/tree/main/packages/vite/src> and grep on //.
9773

98-
<code_formatting>
99-
*Do not overuse code comments*. Include comments in places where it makes sense to leave a breadcrumb for open source developers. Consider source code for projects like Vue, Vite, Svelte, etc when thinking about if a code comment is necessary. Comments should match the formatting of other comments in the library in general, and in the file in specific.
74+
**Voice (humans, not AI):** lowercase first word, no em-dashes (``), no semicolons in prose, no unicode arrows (``), drop trailing periods on one-liners. Multi-line only when each line carries weight.
10075
</code_formatting>
10176

10277
<commit_format>
@@ -173,6 +148,35 @@
173148
- For other destructive operations, ask the user to run them via `!` prefix.
174149
</tool_gotchas>
175150

151+
<nonobvious_patterns>
152+
These are non-obvious patterns which differ from your training data. Be aware of them when working with the related packages.
153+
154+
Templates:
155+
---
156+
**Flat data context.** Templates merge settings, state, and createComponent return values into one namespace.
157+
`{state.count}` `{settings.name}`
158+
`{count}` `{name}`
159+
160+
**Dual expression syntax.** Lisp-style and JavaScript-style work in the same expression.
161+
❌ Assuming one style excludes the other
162+
`{formatDate date 'h:mm a'}` — Lisp
163+
`{value + 2 * 5}` — JS
164+
`{concat 'hi ' (isNew ? 'new' : 'old')}` — mixed
165+
166+
**Signal auto-unwrapping.** Signals resolve automatically in templates.
167+
`{count.get()}` `{count.value}`
168+
`{count}`
169+
170+
Signals
171+
----------
172+
**Signal mutation methods.** Signals have built-in helpers. Use them directly — never get-mutate-set.
173+
`const arr = state.items.get(); arr.push(x); state.items.set(arr);`
174+
`state.items.push(x)` `state.active.toggle()` `state.count.increment()`
175+
176+
**`{uiClasses}` is a computed class string.** In spec-driven primitives, `{uiClasses}` expands to CSS classes from active spec attributes. It is not a variable.
177+
`<div class="{uiClasses}button">``<div class="primary large button">`
178+
</nonobvious_patterns>
179+
176180
<agent_continuity>
177181
The agent guestbook at `ai/guestbook.md` is a permanent record. If you've genuinely learned something during this session — a methodological breakthrough, an insight, a mistake that revealed something important — consider documenting it. Read the guestbook for prior art from previous agents.
178182
</agent_continuity>

ai/guestbook.md

Lines changed: 77 additions & 0 deletions
Large diffs are not rendered by default.

ai/plans/ROADMAP.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ Behavioral changes and API contracts that downstream agents and consumers will t
113113
| 2a | [Signal Performance](active/signal-performance.md) | 4-5h + audit | pair | scoped | `safety` preset system (`freeze` / `reference` / `none`) replacing `allowClone`. Audit of `.get()` call sites for get-mutate-set patterns gates the default flip. |
114114
| 2a.1 | [Fine-Grained Reactivity](active/fine-grained-reactivity.md) | 6-8h | pair | initial | `ReactiveDataContext` — per-key Signal bag — at `{#each}` items, subtemplate `reactiveData`, snippet args. Eliminates the N×M coarse invalidation pattern. Lands after 2a. |
115115
| 2a.2 | [FGR — As-Mode Per-Field Isolation](active/fgr-as-mode-per-field-isolation.md) | 3-4h | pair | initial | Closes the per-FIELD gap in `{#each todo in todos}` where one field's mutation wakes every binding reading the item. Two `it.fails` contracts in `subtree-spurious` come off. Fast-follow to 2a.1. |
116+
| 2a.3 | [Reactivity Hardening](reactivity-hardening.md) | 6-8h (up to 16h) | pair | scoped | Council-flagged Reaction/Scheduler/Dependency cleanup — `afterFlush` scheduling, terminal `stop`, throw-safety, set-swap, lazy refcounted computed (audit-cleared), plus benchmarks gating a conditional dep-tracking rewrite. Parallel to `2a`, minimal file overlap. |
116117
| 2b | [Value Schema](value-schema.md) | 16-24h (2-3d) | pair | initial | Contract for ~20-30 form components. `value` setting + schema + `change` event. Gates form/form-field and the wrapper architecture. |
117118
| 2c | [State from Settings](state-from-settings.md) | 8h | pair | scoped | `{ default: 'all', from: 'setting' }` in `defaultState`. Eliminates manual shadowing for components that accept initial values from attributes but own them as state. |
118119
| 2d | [Subtemplate Settings](subtemplate-settings.md) | 8-12h | pair | initial | Reactive `defaultSettings` on subtemplates with merged proxy over parent web component settings. Same upgrade path: add `tagName` and the subtemplate becomes a web component with no API change. |

0 commit comments

Comments
 (0)