also looking at this
fix(dashboard): read the include toggles and the enabled switch
#1430
5 files
+100
-2
| @@ -793,6 +793,16 @@ cli | ||
| 793 | 793 | const logger = options.verbose ? Logger.verbose() : Logger.quiet() |
| 794 | 794 | const config = await resolveConfig(options.config) |
| 795 | 795 | |
| 796 | // Explicit `false` only. Unset stays on: the setting was documented as | |
| 797 | // defaulting to false and was read by nothing, and enforcing that | |
| 798 | // literally would switch off the dashboard for every repository that | |
| 799 | // never wrote a `dashboard` block — the same trap `ai.review.enabled` | |
| 800 | // set, and the same reading that avoids it. | |
| 801 | if (config.dashboard?.enabled === false) { | |
| 802 | logger.info('ℹ️ Dashboard is disabled by config (dashboard.enabled: false)') | |
| 803 | return | |
| 804 | } | |
| 805 | ||
| 796 | 806 | try { |
| 797 | 807 | logger.info('Creating or updating dependency dashboard...') |
| 798 | 808 | |
| @@ -3151,6 +3161,8 @@ cli | ||
| 3151 | 3161 | // Supplied here because refreshing means a full scan, which is |
| 3152 | 3162 | // `Buddy`'s job rather than the gate module's. |
| 3153 | 3163 | refreshDashboard: async () => { |
| 3164 | if (config.dashboard?.enabled === false) | |
| 3165 | throw new Error('dashboard.enabled is false') | |
| 3154 | 3166 | await new Buddy(config).createOrUpdateDashboard() |
| 3155 | 3167 | }, |
| 3156 | 3168 | }) |