GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — test: add tests for the `lazy_then` utility by snipsnipsnip · Pull Request #35 · exteditor/ghostbird Conversation
|
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughAdds test-reporting utilities and refactors test plumbing, introduces a case-insensitive toposort util, changes lazy initialization API, updates test IO paths and CSS nesting, adds a CI step to include test results in artifacts, and adds a devDependency. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Tests as Test Suite
participant Reporter as dependency_reporter
participant IO as IO util
participant FS as File System
participant CI as GitHub Actions
Note over Tests,Reporter #e6f7ff: dependency collection & report generation
Tests->>Reporter: collectDependencies(registry)
Reporter-->>Tests: yields [name, deps]*
Tests->>Reporter: dumpDependencies(depList, registry, modules)
Reporter-->>Tests: returns Markdown (Mermaid + startup code)
Tests->>IO: writeText(dist/ext/test-result/output.md)
IO-->>FS: create `dist/ext/test-result`
CI->>FS: bundle artifacts
CI->>FS: upload artifacts (includes `dist/ext/test-result` if present)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (11)
Comment |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
yarn.lock is excluded by !**/yarn.lock, !**/*.lock.github/workflows/build.yml (1 hunks)doc/faq-architectural.md (1 hunks)ext/options.css (1 hunks)package.json (1 hunks)src/test/locales.test.ts (2 hunks)src/test/sanity.test.ts (3 hunks)src/test/startup.test.ts (5 hunks)src/test/util/case_insensitive_toposort.ts (1 hunks)src/test/util/dependency_reporter.ts (1 hunks)src/test/util/io.ts (2 hunks)src/util/lazy_then.ts (1 hunks)src/util/types.ts (1)
LocalesTomlContent(2-2)
src/test/util/io.ts (1)
loadSourceTexts(66-70)
src/root/util/wire.ts (1)
ResolveQuery(126-130)src/util/case_folding_set.ts (1)
CaseFoldingSet(1-11)src/test/util/case_insensitive_toposort.ts (1)
caseInsensitiveToposort(4-17)
src/root/startup/startup_background.ts (1)
prepareBackgroundRouter(31-38)
src/test/util/dependency_reporter.ts (4)
AnyModules(7-7)collectDependencies(30-67)dumpDependencies(9-27)AnyEntry(6-6)src/root/util/wireless.ts (1)
wireless(45-57)src/test/util/io.ts (1)
writeText(19-29)
doc/faq-architectural.md (2)
13-17: LGTM! Clear explanation of type safety verification.The new FAQ section effectively explains how type safety is partially verified through tests and provides clear guidance on running them.
25-25: File extension is correct The tests generatedependency_tree.md(see src/test/startup.test.ts:66), so the change from.mermaidto.mdis valid.package.json (1)
77-77: LGTM! Dependency added for test utility.The
toposort-classpackage is appropriately added as a devDependency to support the newcase_insensitive_toposorttest utility.src/test/sanity.test.ts (2)
13-13: LGTM! Adopts Vitest 3.x injection pattern.Removing the
expectimport and using the injected parameter aligns with modern Vitest best practices and makes test dependencies explicit.
17-17: LGTM! Consistent test callback signature.Using the destructured
{ expect }parameter makes assertions explicit and consistent across the test suite.src/test/locales.test.ts (2)
1-3: LGTM! Test utilities reorganized and expect injection adopted.The import path change to
./util/ioindicates better organization of test utilities, and removing theexpectimport aligns with the new injection pattern.
23-23: Narrowed glob pattern safely covers all locale ID usage.Verified no
"src_*"IDs occur outsidesrc/{root,ghosttext-adaptor}, so the updated glob requires no further changes.src/test/util/io.ts (3)
41-45: LGTM! Clearer path handling with absolute paths.Changing
loadTomlto accept an absolute path and updating the documentation improves clarity and reduces ambiguity in path resolution.
66-69: LGTM! Consistent path handling for glob patterns.The updated path resolution for
loadSourceTextsaligns with the other path changes and the documentation correctly describes the glob as relative topackage.json.
52-59: Paths resolve correctly The updated relative paths correctly locatelocales.tomlandext/options.cssat the project root.src/test/util/case_insensitive_toposort.ts (2)
4-17: LGTM! Correct implementation of case-insensitive topological sort.The implementation correctly:
- Normalizes keys and edges to lowercase for sorting
- Maintains a map from lowercase to original casing
- Returns results with original casing preserved
The logic is sound and handles the case-insensitive requirement properly.
1-2: Confirmed absence of TypeScript definitions fortoposort-class; the// @ts-expect-errordirective is justified.ext/options.css (4)
27-39: LGTM! Modern CSS nesting improves maintainability.The refactored border-radius rules using nested
&selectors maintain the same functionality while improving code organization and readability.
44-50: LGTM! Input type selectors properly nested.The nested input type selectors maintain the same specificity and functionality while providing better code organization.
52-59: LGTM! Label selectors consolidated with nesting.The refactored label rules using nesting maintain the same behavior while improving code structure.
60-71: LGTM! Progress state styles properly nested.The nested
.progressselectors maintain the same animations and styling while providing better code organization. The animation timing and colors are preserved correctly.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Also, remove unused `awaitable`
Also, adjusted data shape to use the toposort library added later
6227a12 to
aaf6e99
Compare
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.