✨ Add CLI visual context workflows#247
Conversation
Add read-only context commands for cloud and local workspace use, document the new JSON and agent workflows, and keep the surface aligned with the context API.
PR Review: ✨ Add CLI visual context workflowsOverall this is a well-structured addition. The dependency-injection pattern for testability ( 🐛 Bugs1. Hardcoded macOS path in if (/^https?:\/\//.test(assetPath) || assetPath.startsWith('/Users/')) {
return assetPath;
}The import { isAbsolute } from 'node:path';
if (/^https?:\/\//.test(assetPath) || isAbsolute(assetPath)) {
return assetPath;
}2. Schema mismatch in output.print(` ${colors.bold(context.fingerprint_hash)}`);The JSON output doc (and the ⚡ Performance3.
Simplest fix — memoize within a request scope by caching the snapshot inside the closure on first load, or accept a pre-loaded snapshot as a parameter in function isAvailable(snapshot) {
return Boolean(
snapshot.serverInfo || snapshot.session || ...
);
}Similarly, 🧹 Code quality4. Double output configuration ( Each exported command (e.g., 5. let limit = query.limit || unresolved.length || 10;If there are no limits set and 500 unresolved comparisons, this returns all 500. The cloud endpoint presumably pages; local should too. Consider capping at a sensible default (e.g., 50) to keep the output predictable for agents. 6.
🧪 Test coverage gaps
Minor nits
The |
Address the cross-platform local path check, fingerprint display mismatch, local snapshot caching, and add direct resolver/provider coverage for the context workflow.
Move report data normalization into shared CLI utils so the built context provider no longer depends on reporter source paths at runtime.
This comment has been minimized.
This comment has been minimized.
Update the reporter report-data test to use the shared utility path so Node and visual CI jobs stop importing the removed reporter-local module.
Vizzly - Visual Test Results
|
Summary
vizzly contextcommands for build, comparison, screenshot, similar, and review queue bundles.vizzly/alongside cloud context resolutionVerification