feat(core+home+tasks): config-driven nav filter + statistics dynamic guard + haloCount prop + save-on-action#4239
Conversation
…stream
T3: Add config.modules[name].display override in core.store.js refreshNav() so
downstream projects can hide nav entries via config without touching meta.display.
T4: Skip homeStore.getStatistics() in home.view.vue created() when
config.home.statistics.dynamic === false — avoids unnecessary API calls.
T5: Add haloCount prop (1–5, default 4) to home.statistics.component.vue and
home.blur.background.component.vue — lets downstreams trade visual richness for perf.
T6: Remove deep watch:{task} from task.view.vue; set this.save=true in title/description
computed setters so dirty-detection fires only on user-triggered edits.
Tests: core.store (4 T3), home.view (6 T4, new file), home.statistics (3 T5), task.view (4 T6).
Lint: clean. Test delta: +38 passing, 0 new failures vs baseline.
Closes #4238. Partially closes pierreb-projects/infra#38.
|
Warning Review limit reached
More reviews will be available in 50 minutes and 40 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (9)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4239 +/- ##
=======================================
Coverage 99.56% 99.57%
=======================================
Files 31 31
Lines 1162 1163 +1
Branches 329 329
=======================================
+ Hits 1157 1158 +1
Misses 5 5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR promotes four downstream-proven improvements into the devkit so all stack consumers inherit them on the next /update-stack: config-driven navigation filtering, a config guard for dynamic statistics fetching, a performance knob for blur halo rendering, and more precise “dirty” detection in the task editor.
Changes:
- Add
config.modules?.[route.name]?.display === falseoverride incoreStore.refreshNav()to hide module nav entries without router meta edits. - Skip
homeStore.getStatistics()whenconfig.home.statistics.dynamic === falseto avoid unnecessary API calls for static stats deployments. - Add
haloCountprop plumbing to reduce the number of animated blur halos rendered (with accompanying unit tests). - Remove deep
taskwatcher intask.view.vueand setsave=trueonly on user edits (title/description setters), with unit test coverage.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/modules/core/stores/core.store.js | Adds config-based module display override during nav rebuild. |
| src/modules/core/tests/core.store.unit.tests.js | Adds unit tests covering config.modules[route].display behavior in nav filtering. |
| src/modules/home/views/home.view.vue | Adds statistics.dynamic === false guard around statistics fetching. |
| src/modules/home/tests/home.view.unit.tests.js | New unit tests verifying the statistics dynamic guard and articles/news behavior. |
| src/modules/home/components/home.statistics.component.vue | Adds haloCount prop and forwards it to blur background wrapper. |
| src/modules/home/tests/home.statistics.component.unit.tests.js | Extends tests to validate haloCount default/forwarding/accepted range. |
| src/modules/home/components/utils/home.blur.background.component.vue | Adds haloCount prop and conditionally renders halo layers to reduce cost. |
| src/modules/tasks/views/task.view.vue | Replaces deep task watcher with save-on-user-edit via computed setters. |
| src/modules/tasks/tests/task.view.unit.tests.js | Adds tests ensuring save toggles only on user edits and watcher removal. |
| // Number of animated halos to render (1..5). Lower = cheaper. | ||
| haloCount: { | ||
| type: Number, | ||
| default: 5, | ||
| validator: (v) => v >= 1 && v <= 5, | ||
| }, |
| // For blur variant - number of animated halos (1..5). Lower = cheaper. | ||
| haloCount: { | ||
| type: Number, | ||
| default: 4, | ||
| validator: (v) => v >= 1 && v <= 5, | ||
| }, |
Summary
Promotes 4 generic improvements originally developed in
comes-io/trawl_vueback up to devkit. All downstream projects will absorb these via their next/update-stackrun.Tracked under infra#38 (trawl→devkit drift cleanup). Closes #4238.
Changes
T3 — Config-driven nav filter (
core/stores/core.store.js):refreshNav()now checksconfig.modules?.[i.name]?.displaybeforemeta.display. A downstream can hide a module's nav entry viaconfig.modules.X.display = falsewithout altering router meta.T4 —
statistics.dynamicguard (home/views/home.view.vue):created()skipshomeStore.getStatistics()whenconfig.home.statistics.dynamic === false. Avoids needless API calls for downstreams with static stats.T5 —
haloCountprop (home/components/home.statistics.component.vue+home.blur.background.component.vue): New numeric prop (1–5, default 4/5) to control how many animated halos render. Lower = cheaper.homeBlurBackgroundComponentusesv-ifper halo.T6 — Save-on-action fix (
tasks/views/task.view.vue): Removeswatch: { task: { deep: true } }. Setsthis.save = truein thetitleanddescriptioncomputed setters instead — dirty-detection now only fires on genuine user edits, not programmatic resets likegetTask().Tests
core.store.unit.tests.js— 4 new T3 assertions (config.modules display override)home.view.unit.tests.js— new file, 6 T4 assertions (statistics.dynamic guard)home.statistics.component.unit.tests.js— 3 new T5 assertions (haloCount prop + forwarding)task.view.unit.tests.js— 4 new T6 assertions (save-on-action, no watch block)Test delta vs baseline: +38 passing, 0 new failures. Lint: clean.
References