Repository navigation
1.1.1
Changed
-
The dev kit is obsidian-plugin-dev-kit 0.3.0 (moved with
opdk kit upgrade v0.3.0), so thatopdk scanreports what the community scorecard reports. Four things follow. TypeScript is 6 (typescript^6.0.3, was^5.6.0); the code needed no changes to compile. The ESLint config is renamed fromeslint.config.jstoeslint.config.mjs, because the scanner does not read.mjsfiles and a.jsconfig that imports the kit gets two warnings there;npm run lintlints the same files as before. Thescan.ignorekey is gone fromopdk.config.mjs(the kit removed it: a skipped file was still on the public scorecard), soopdk scannow readssite/too and found 20 CSS warnings in the GitHub Pages stylesheets, which are fixed: the!importantrules on code in the explorer, the block index and the key list now win by specificity, and the reduced-motion rule names the animated elements instead of using*; the "On this page" list is a two-column grid filled top to bottom (each list sets its row count) instead of CSS columns; the unused:has()rule is removed;ui-monospaceis dropped from the code font stack (the next font in it, SF Mono, is the same face) and links lose the 1px underline thickness (the browser default is used, offset unchanged). Screenshots of the home page and all guides before and after, at 1280 and 390 pixels wide, differ by a few single pixels at the ends of link underlines and nowhere else.opdk scannow prints 0 findings and one advisory line forsite/assets/site.js, which no tsconfig covers. -
The dev kit is obsidian-plugin-dev-kit 0.2.0 (was 0.1.0), moved with its new
opdk kit upgradecommand: the tag inpackage.json, the lockfile and the two kit workflow lines (ci.yml,release.yml) name commit32a1860. Its lint preset reports a barewindow.<member>again, the check the oldscorecard-check.cjshad; Garmy has none.opdk release checknow also fails when those three places disagree. Typecheck, lint, 499 unit tests, build,opdk scan,opdk release check,readme:check,site:checkand the e2e pass on it. -
The sleep and HRV guide says the Choose step groups appear under the Everything kind, and names the Sleep and HRV and recovery kinds.
-
The site no longer copies the
phone-*stills, which only feed the directory pictures (tools/listing.mjs). -
Build, lint, scanner, end-to-end harness, README films and release are done by obsidian-plugin-dev-kit 0.1.0 (the
opdkcommand, installed from itsv0.1.0tag). Garmy's own settings are inopdk.config.mjs. The scripts it replaces are deleted:assert-bundle.cjs,scorecard-check.cjs,e2e-setup.sh,capture.mjs,version-sync.cjs,make-zip.cjsandassert-versions.cjs. -
The release bundle is built by
opdk buildand is now minified:main.jsgoes from 336087 to 285177 bytes (114154 bytes gzipped, was 121404; both measured asgzip -c main.js | wc -con the build oforigin/mainand of this branch). The platform staysbrowser, and the kit also marks@codemirror/stateand@codemirror/viewas external, which Garmy does not import. The kit's bundle check (noprocess,node:imports,__dirname) replacesscripts/assert-bundle.cjs. TheesbuilddevDependency is gone, the kit brings its own. -
npm run scorecard:checkrunsopdk scan(the scanner's own ESLint configuration foreslint-plugin-obsidianmd0.5.1, plus CSS, source and manifest checks) instead ofscripts/scorecard-check.cjs. The old script's check for a barewindow.<member>(other than timers) insrc/is gone: the kit scanner does not check it yet. The scan reads every tracked file, so the GitHub Pages site (site/, a static web page that never ships inmain.js) is listed underscan.ignore; without that it reports 36 lint and 20 CSS findings insite/assets/, which the old script and the lint config skipped as well. -
eslint.config.mjsisobsidianPlugin()from the kit, with Garmy's own ignore list, andnpm run lintruns with--max-warnings=0. Theeslint-plugin-obsidianmd(was 0.4.2),typescript-eslintand@eslint/jsdevDependencies are removed: the kit pins its owneslint-plugin-obsidianmdandtypescript-eslint, and@eslint/jsis no longer needed. The@typescript-eslint/no-misused-promisesrule is replaced byobsidianmd/no-misused-promises. -
The e2e harness is the kit's
obsidian-plugin-dev-kit/e2emodule:e2e/fixtures.tsis onecreateObsidianTestcall andplaywright.config.tsisdefineObsidianConfig().npm run e2eisnpm run build && playwright test, so the specs run against the minified bundle;npm run e2e:setupandscripts/e2e-setup.share gone. Every test still gets its own Obsidian process, vault copy and user-data folder, now installed, trusted and waited for by the kit instead of fixed sleeps (1500 ms inwin, 800 ms and 1500 ms insync.spec.ts, two of 1500 ms inexisting-notes.spec.ts). The generatede2e-vault.pristine/.obsidian/plugins/folder and its.gitignoreentry are gone: the kit installs Garmy and Dashy into the temp copy. The kit refuses a Garmymain.jsolder thansrc/; the Dashy checkout installed beside it is not checked, so a Dashy build needs no override. -
The e2e specs use the kit's helpers:
obsidian.openSettings("garmidian")(the settings spec no longer hunts for a second window),obsidian.waitForMetadataCache(),obsidian.replace()for the fake Garmin (fakeGarmin(obsidian, ...)andinstallDemoGarmin(obsidian, ...)return the fake's handle, and the units spec counts requests withcalls()),obsidian.evaluate()in place of most of theglobalThis as unknown as { app ... }casts (setKeyandopenWizardine2e/fixtures.tskeep theirs),obsidian.runCommand(),obsidian.hideProperties(),obsidian.setTheme(),obsidian.clearNotices(),obsidian.readingView(),obsidian.scrollThrough()andobsidian.mobile()in the capture spec, andonlyWhen("CAPTURE")/onlyWhen("GARMIN_LIVE")in place oftest.skip. Both gates now need the value1, asnpm run capturesets;GARMIN_LIVE=trueno longer runs the live spec. -
npm run typecheckalso checkse2e/throughe2e/tsconfig.json. -
The README films (
film-wizard,film-rebuild,film-languages,film-libraryindocs/screens) are shot with the kit'sdemofixture (a film of stills,film.shot({ hold })) and encoded byopdk demo(settings inopdk.config.mjs).npm run captureisbuild, the capture spec andopdk demo;scripts/capture.mjsis deleted, andnpm run capture -- <word>is gone:npx opdk demo film-libraryre-encodes one film. The frames are 2x on any display (the library poster was 980 x 1000, now 1960 x 2000), the clock is frozen at 2026-11-11, the ribbon, status bar, tab headers and side panels are hidden, a retake replaces the frames instead of appending to the old ones, and a visible cursor shows where the mouse last moved. The GIFs keep 160 colours at 8 fps and their widths; the first frame is still the poster. The stills are retaken in the bullets below. -
Releases are cut with
npx opdk release patch(orminor,major, an exactX.Y.Z;--dry-runfirst) in place ofversion-sync.cjsand a hand-pushed tag. It bumpspackage.json,package-lock.json,manifest.jsonandversions.json(an existingversions.jsonentry is never rewritten), moves the CHANGELOG entries under the new version, commits, pushes the annotated tag (tags were lightweight before) and waits forrelease.yml. That workflow is the kit's reusable one, pinned to its full commit: it builds with a read-only token, attestsmain.js,manifest.jsonandstyles.css, and makes a draft whose notes are the CHANGELOG section of the version (the release page showed GitHub's generated list before).opdk releasethen checks the draft against a local build of the tag, publishes it and only then pushes the branch. No zip is built or attached any more (npm run release:zipandmake-zip.cjsare gone), andrelease.ymlruns the unit tests in atestjob before the kit's release jobs.opdk releaseitself runs no tests, so runnpm run release:checkfirst, which now starts withopdk release check(versions,versions.json, manifest rules, CHANGELOG section, build, byte-for-byte reproducibility,minAppVersionagainst the API). Do not release unpushed commits. -
ci.ymlcalls the kit'splugin-ci.yml(pinned to the same commit) for lint, typecheck, unit tests,opdk scan,opdk release check, the build and thegarmidian-bundleartifact, and keepsreadme:checkas a job of its own. Runners areubuntu-24.04and actions are pinned to commits (they wereubuntu-latestand major tags). The bundle artifact no longer holds a zip. -
@playwright/testandelectronare pinned to exact versions (1.65.0 and 44.10.2) as the kit documents;jsdomandviteare devDependencies for the unit tests, andobsidian-test-mocksis pinned to 8.0.0 with Dependabot ignoring its major updates. -
vitest.config.tsisdefineUnitConfig()from the kit: Garmy's own stub for the node tests,obsidian-test-mocksin jsdom for the wizard and settings tests. The coverage gate (90 percent, 80 for branches) now countssrc/app/wizard.tsandsrc/app/settings.tstoo. -
pages.ymlruns onubuntu-24.04and pins every action to a full commit with its version in a comment (checkoutv7.0.1,setup-nodev7.1.0,configure-pagesv6.0.0,upload-pages-artifactv5.0.0,deploy-pagesv5.0.1; the first two are the commitsci.ymlandrelease.ymlalready use). The checkout no longer keeps the token (persist-credentials: false). The permissions are unchanged:contents: readfor the checkout,pages: writeandid-token: writefor the deploy. Theci.ymlbullet above says runners and actions are pinned; that held forci.ymlandrelease.ymlonly until now.ci.ymlalso runsnpm run site:checkin itspluginjob, so a broken site link fails the pull request instead of the tag. -
The README, site and listing pictures are retaken with the kit's
demo.still(e2e/capture.spec.ts): every still is 2x on any display, settled (settle: true, no fixed sleeps before a shot), taken without the cursor arrow, on the frozen day, with the ribbon, status bar, tab headers, note title, properties block and side panels hidden.opdk democopies them todocs/screens. The site's image sizes, the Choose step text and two alt texts now match the new pictures. The pixel sizes of the 2x stills do not change, apart fromwizard-key-lightandwizard-preview-light(2 px taller); the files are not byte-identical to the old ones. The window is clamped to the display, so a clip taller than the window (1084 px here) fails the shot instead of being cut. -
The phone listing set is shot in the mobile interface at 390 x 700 and 2x (780 x 1400, was 1x 390 x 700 stretched about 1.5x by
tools/listing.mjs), on the same frozen day and clean UI as the desktop pictures (the numbers now match: sleep 6h 47m, HRV 55; the phone set showed 6h 29m and 61), without the duplicated inline title and without the floating bottom toolbar that covered the cards. The sources aredocs/screens/phone-*.png(new, five files), whichtools/listing.mjsreads in place of.capture/phone. -
film-wizardis clipped to 1200 x 1080 with the modal pinned to the top of the window, so no step is cut off and the modal no longer jumps between steps (the GIF is 1000 x 900, was 1000 x 717 with the key step cut below "Look for those notes"). Clicks in the wizard and library films go throughdemo.moveAndClick, so the cursor travels to each button and card;film-rebuildandfilm-languagesclick nothing and show no cursor.wizard-choose-light.pngis now the current library step (1632 x 1952), the old picture predated the card library (1632 x 1324). -
No poster is made (
poster: false) and the fourfilm-*-poster.pngfiles are deleted; every film setsloop: "off"(each is a tour, so the loop warnings are gone). Sixteen stills that neither the README, the site nor the listing use are no longer shot and are deleted:rebuilt-light,young-light,wizard-key-de,tpl-glance-a-dark,tpl-month-b-light,tpl-recovery-a-light,tpl-recovery-b-light,tpl-run-a-dark,tpl-sleep-a-dark,tpl-sleep-a-light,tpl-sleep-b-light,tpl-strength-b-light,tpl-triathlon-a-light,tpl-triathlon-b-light,tpl-year-a-lightandtpl-year-b-light. The key field is aforbiddenSelectorsentry of the demo fixture (#garmy-key-input[type=text]), so a picture taken after "Show" fails. -
e2e/capture.spec.ts: the dead Live Preview experiment andvoid topare gone, the extracollapseSidebars()calls and fixed sleeps are replaced bysettle, a failed notice wait is an assertion instead of a swallowed error, the properties block is hidden throughapp.json(the in-memoryobsidian.hideProperties()was undone when Obsidian re-read the file) and the "six languages" test, which shoots seven, is renamed.
Added
-
Unit tests of
src/main.ts,src/app/rebuild.tsandsrc/app/media-slot.ts(src/main.test.ts,src/app/rebuild.test.ts,src/app/media-slot.test.ts, in jsdom on the mock harness) and a check of the empty-folder text in every language (src/i18n/locales.test.ts). They coversyncNowand its failures (a rejected key is remembered and offered once to the background, offline and rate limits only speak to a click),startAutoSyncwith fake timers and a fake client (the startup delay, the half-hour checks, "turned off", "no key", "key rejected earlier", "synced recently", one timer however often it starts, no overlapping sync), the commands andonloaddefaults, the Dashy helpers, the transport timeout, the play/stop toggle of the help clips and the rebuild of a dashboard in the open note.src/main.ts,src/app/media-slot.ts,src/app/rebuild.tsandsrc/i18n/**are now inside the coverage gate; before it left outmain.ts(48.7 % of lines),media-slot.ts(71.7 %) andrebuild.ts(0 %). 420 tests became 497. -
Unit tests of the wizard and the settings tab (
src/app/wizard.test.ts,src/app/settings.test.ts, withsrc/test/mock-app.ts), run in jsdom onobsidian-test-mocks. They drive the steps of the wizard, the sync with a fake client and its failures, and the rows of the settings tab, which only the e2e run covered before. 349 tests became 420. -
e2e/tour.spec.tsreplacestools/tour.mjs, the last launcher of Obsidian outside the kit's fixture (own Electron start onapp.asar, trust dialog dismissed after fixed waits, Settings hunted in a second window,is-mobiletoggled by hand). It runs only withTOUR=1(TOUR=1 npx playwright test e2e/tour.spec.ts) on the fake Garmin and writes its pictures to.e2e/tour. It keeps the tour's walks: Settings without and with a key, every error and warning state of the key and load steps, key to a finished dashboard, and the layout checks, now as assertions: no sideways scroll in the modal, no touch target under 44 px on the Choose step in Obsidian's real mobile interface (obsidian.mobile(), not a class toggled by hand), and a 2 px focus ring on every Tab stop up to the primary button, each stop inside the wizard. Not carried over: the stepper's back navigation (covered bywizard.test.tsandwizard.spec.ts) and the dark walk without Dashy. The old tour read the real key from the macOS Keychain by default; the spec reads it only whenGARMIN_LIVE=1is also set, throughe2e/live-key.ts, whichlive.spec.tsshares.
Fixed
- The three e2e specs that proved "auto sync does nothing" (turned off, interval not passed, key rejected earlier) with a fixed 3 s wait each (9 s of the run) are gone: the same rules are now unit tests of
startAutoSyncwith fake timers. The positive wiring spec stays. The cancel spec waits for the first progress tick instead of sleeping 900 ms. e2e/language.spec.ts"follows Obsidian when the setting is automatic" pinnedlanguage: "en"through the fixture, so it did not test the automatic setting; it now setsautofirst.- The e2e fixture pins
syncHours: 0and the settings spec installs the fake Garmin before it stores a key; in the sync specs the fake goes in before the key. A spec could otherwise store a key with auto-sync on and let the startup timer call the real Garmin API. e2e/sync.spec.ts"the latest days are refreshed" polls for the changed values instead of relying on one metadata-cache wait, which could read the old frontmatter.