chore: migrate motoko/daily_planner to icp-cli#1370
Open
marc0olo wants to merge 13 commits into
Open
Conversation
Replace dfx.json with icp.yaml, update mops.toml to moc 1.9.0 and
core 2.5.0, add ic = 4.0.0 dependency, replace ic:aaaaa-aa with
import { ic } "mo:ic" + IC "mo:ic/Types", add icp-bindgen-based
vite.config.js and actor.js, add Makefile with numbered tests for
all public functions, add CI workflow, and delete BUILD.md,
dfx.json, and .devcontainer/.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ernal services' Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- await renderDayDetail() in handleFetchOnThisDay — without it, hideLoading() fires before getDayData returns, causing stale state display - Zero-pad month and day in dateString (2026-06-11 not 2026-6-11) to match the zero-padded prefix generated by getMonthData in the Motoko backend; without this, calendar month indicators never appear for notes Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The icp-sdk bindgen plugin processes Candid opt types at the binding layer: - getDayData returns null | DayData (not [] | [DayData]) - onThisDay field is null | OnThisDay (not [] | [OnThisDay]) The frontend was written for raw Candid JS arrays, causing: - data?.length > 0 always false (plain object has no .length) - onThisDay.length > 0 always false (plain object has no .length) Both conditions always fell back to the empty default, hiding all data. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- vite.config.js: remove dfx fallback block and dfx comment; remove CANISTER_ID_BACKEND env var baking (only needed as dfx fallback) - actor.js: remove dfx fallback canister ID resolution and dfx mentions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrates
motoko/daily_plannerfrom dfx to icp-cli.dfx.jsonwithicp.yaml(@dfinity/motoko@v5.0.0+@dfinity/asset-canister@v2.2.1)backend/app.mo; replaceimport IC "ic:aaaaa-aa"withimport { ic } "mo:ic"+import IC "mo:ic/Types"getMonthDatamonth prefix to zero-pad single-digit monthsmops.toml: moc 1.9.0, core 2.5.0, ic 4.0.0, json, map; applymops check --fixicp-dev-env-motoko:0.3.2),Makefilewith 6 tests (null state, add note, read note, month filter, complete note, empty month)2000-01-15, month(2000, 1))## Overview/ GitHub link; fix dapp→app; fix "on the network" / "data from external services"Frontend adjustments for icp-cli toolchain:
getMonthDataprefixopt Ttonull | T(not the raw Candid JS[] | [T]that dfx produced); updatedgetDayDataresult handling andonThisDayrendering accordinglyawait renderDayDetail()inhandleFetchOnThisDay(was not awaited, causing a race withhideLoading)Test plan
motoko-daily_plannerCI passes🤖 Generated with Claude Code