feat(ffi): bindings of activity commands for Kotlin #307
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "283_activity-bindings"
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?
Closes #283 (part of #277).
Activity commands now cross into Kotlin: the report, the range syntax and the configuration.
Core (facade)
api::ActivityRange: the days, the label, the range as written again (spec) and the ranges a step back/forward give (previous/next, none where no step is possible).ActivityReport.rangeis now this record (it replaceslabel,can_step_back,can_step_forward), so the app does no date arithmetic for the arrows.api::resolve_activity_range(text, today)andapi::activity_quick_picks(today).config::projectre-exportsActivityCommandFileandSeriesFile.Bindings (
streamd-ffi)CommandKind.Activity: activity commands are no longer filtered out ofProject.commands().project.activity(store, stream, key, range: String, excludeMixed: Boolean?, now, offset, limit) -> ActivityReport, withActivityRange(RangeUnit,text,previous/nextas text),ActivityShape,ActivitySeries(#RRGGBB),ActivityDay(DayKindNone/Single/Mixed/Future/Untracked,counts,shards,drawnindices,level),ActivityStats(both ways to count a mixed day, with their percentages),ActivityShardPage,shared.activityRange(text, today)(throwsInvalidRangewith the core's wording) andactivityQuickPicks(today) -> List<QuickPick>.CommandSettings.ActivitywithActivitySettings,IntensitySetting,MixedSetting,SeriesSettings, both ways;ConfigTable.ActivityCommandandSeries.InvalidRangealready crossed, soerror.rsneeded no change.App
The new variants reach the app's exhaustive
whens, so it gets the minimum: an activity command is listed in the configuration (its series as its line), its form shows only the description (the rest is given back unchanged), and it is left out of the "new command" menu. The screen and the full form are #284–#286.Tests
activityRange/quick picks; the outline round trip with an activity command added to the starter configuration, and a form put that writes nothing new.ffi-kotlin): the sample month of #279 through the map store, the quick picks,InvalidRange, and the outline round trip.ConfigListTestfor the activity arms;nix build .#streamd-app(unit + screenshot tests) passes.nix flake checkpasses.Docs: R35/R36 of REQUIREMENTS.md, AGENTS.md (facade,
project.rs,records.rs,outline.rs, activity module), README.Also fixes a doc comment of
FileTargetinrecords.rsthat had a line of code pasted into it.e086f55c9d4fe8736746