Repository navigation
feat!: rebrand as nudge and rewrite the engine - #17
Merged
Merged
Conversation
Rename the package to nudge (flutter_trigger is taken on pub.dev) and rewrite the engine around immutable conditions evaluated against the initialized instance. - Conditions compare by value and are evaluated in one pass: no transient values, no resubscriptions on rebuild, relative time windows. - Nudges: definitions with cooldowns, caps, once per session, group policies, priorities, outcome-based policies and chaining, fired at checkpoints, directly or through NudgeFireListener. - New conditions: attribute filters, distinct values, active days, streaks, recency, app-wide metrics, funnel windows, single-session funnels and drop-off. - Lifetime stats and fire history survive log rotation; sessions follow the app lifecycle. - Pluggable storage with an in-memory implementation and an injectable clock; flex attributes replace the orphan-prone relation. - Tests for the DSL, nudges, widgets, storage contract and every documented recipe; docs.page documentation; CI for tests on the ObjectBox engine, format, codegen, docs links and dry-run publish.
|
Important Review skippedToo many files! This PR contains 103 files, which is 3 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configuration
⛔ Files ignored due to path filters: 1
📒 Files selected for processing: 103
You can disable this status message by setting the
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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
Renames the package to nudge (
flutter_triggeris already taken on pub.dev by another publisher) and rewrites the engine. The fluent builder DSL is kept.Engine
and/or, no resubscription on parent rebuilds, relative time windows (inLast,today) re-evaluated on resume and periodically.define(id).when(...).cooldown(...).maxFires(...).oncePerSession().groupCooldown(...).onOutcome(...).register(), fired withcheckpoint()(priority + group),fire()orNudgeFireListener; outcomes viaNudgeFire.complete, chaining viawhen().fired(id);explainNudge(id)shows the blocking policy.NudgeStorage: ObjectBox (flex attributes, no orphaned rows, attach on hot restart) andInMemoryNudgeStoragefor tests; injectableClock.Fixes over 0.1.0
Same-millisecond funnel steps, funnel session constraints ignored on earlier steps, completed funnels flipping back, listener re-firing on rebuild, first-frame flicker in the builder, orphaned attributes after purge, strict timestamp bounds, concurrent
initialize, empty funnel crash, missingflat_buffersdependency (blocked publishing).Docs and CI
docs.json,docs/, excluded from the archive via.pubignore): guides plus 12 recipes with sources; every recipe is executed intest/recipes_test.dart.flutter pub publish --dry-run.COPYINGrenamed toLICENSE(content unchanged) as pub.dev expects.Test plan
flutter analyze(package and example)flutter test: 117 package tests, 2 example tests, ObjectBox suite with the native librarybuild_runneroutput matches the committed bindingsflutter pub publish --dry-runon a clean checkout: 0 warnings