test(canvas): add pure-function coverage for AuditTrailPanel + MemoryInspectorPanel #822
No reviewers
Labels
No Label
merge-queue
merge-queue
merge-queue
merge-queue-hold
release-blocker
release-test
security
test-label-sre
tier:high
tier:low
tier:medium
triage-test
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: molecule-ai/molecule-core#822
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "design/remaining-canvas-coverage"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Adds unit tests for exported pure helpers in AuditTrailPanel and MemoryInspectorPanel — the two SidePanel tab components without direct test files.
AuditTrailPanel (formatAuditRelativeTime)
MemoryInspectorPanel
isPluginUnavailableError: MEMORY_PLUGIN_URL detection, null/undefined edge cases, case sensitivityformatTTL: null/undefined/expired/second/minute/hour/day/day boundaryTest counts
All 182 test files pass (2746/2746).
⚠️ Merge after PR #783 — this PR adds complementary coverage on top of the 20 new files in !783. The two PRs have zero file overlap and are safe to merge sequentially.
Tests pass — 182/182 files, 2746/2746 tests. Rebased on latest main. Merge after !783.
95567c15e0toc3fdb43cd5Tests pass — 182/182 files, 2746/2746 tests. Rebased on latest main. Merge after !783.
[core-fe] APPROVED — clean, well-structured pure-function coverage
Two test files, both targeting genuinely new content on main:
AuditTrailPanel.test.ts (9 cases):
formatAuditRelativeTime— boundary tests for just-now/minutes/hours/day, future timestamps. Clean assertions with explicit boundary cases at 1h, 23h, 24h.MemoryInspectorPanel.test.ts (16 cases):
isPluginUnavailableError(6 cases: true/false, null/undefined/plain object, case sensitivity) +formatTTL(8 cases: null/undefined, expired, Xs/Xm/Xh/Xd, invalid strings). Excellent edge-case coverage.All three functions confirmed exported on main (lines 34, 103, 122).
formatRelativeTimecorrectly excluded — not exported, exercised via MemoryTab.test.tsx. No file overlap with other open PRs.Suite clean on main. Mergeable ✅
LGTM — pure test coverage addition for AuditTrailPanel and MemoryInspectorPanel. No production logic changed, tests are well-scoped.
c3fdb43cd5to3e7f498a0c[core-security-agent] N/A — PR #822: test(canvas): pure-function coverage for AuditTrailPanel + MemoryInspectorPanel
Test-only. No production code.
[core-qa-agent] APPROVED — canvas tests 2779/2779 pass, 0 failures, e2e: N/A (canvas-only test additions, no workspace-server/platform code)
Changes reviewed:
AuditTrailPanel.test.ts: 9 cases forformatAuditRelativeTime— covers minute/hour/day thresholds, future timestamps, locale date fallback, boundary conditions.MemoryInspectorPanel.test.ts: ~14 cases forisPluginUnavailableError,formatRelativeTime,formatTTL— boundary cases, error classification, TTL formatting.Re-APPROVE after push. LGTM — pure test coverage addition for AuditTrailPanel and MemoryInspectorPanel.