Repository navigation
fix(aggregator): surface expiring quota actions on Today and Needs You #4695
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,6 +25,7 @@ import { | |
| import { loadConfig } from "./config.ts"; | ||
| import { itemServiceLinks } from "./service-links.ts"; | ||
| import { loadFeed } from "./feed.ts"; | ||
| import { AA_PLAN_FACTS } from "./aa.ts"; | ||
| import { | ||
| buildHealth, | ||
| pageRenderHealth, | ||
|
|
@@ -35,7 +36,7 @@ import { | |
| } from "./health.ts"; | ||
| import { manifestRouteFor } from "./pages.ts"; | ||
| import { watchdogTierItems, WATCHDOG_PROBE_SERVICE_IDS } from "./watchdog.ts"; | ||
| import { allRefs, buildAttention, deriveToday, projectPace, type RoadmapGrain } from "./derive.ts"; | ||
| import { allRefs, buildAttention, buildQuotaActions, deriveToday, projectPace, quotaActionTierItems, type RoadmapGrain } from "./derive.ts"; | ||
| import { | ||
| reconcileRoadmap, | ||
| roadmapDriftReport, | ||
|
|
@@ -434,8 +435,20 @@ async function attentionContext() { | |
| // recomputes it on every orchestration read (#1139). | ||
| const diagnosis = source.diagnostics?.().orchestration; | ||
| const watchdog = await deriveWatchdogItems(diagnosis); | ||
| const quota = await source.quota().catch(() => null); | ||
| const view = buildAttention(feed, summary, Date.now(), diagnosis, watchdog); | ||
| // #1174: the same eligible quota actions as /quota's strip and | ||
| // /today, as orchestrator-tier task items — derived once here from | ||
| // the same pure function, so entries clear on every surface the | ||
| // moment their source condition no longer holds. | ||
| if (quota) { | ||
| view.orchestratorExtra = [ | ||
| ...view.orchestratorExtra, | ||
| ...quotaActionTierItems(buildQuotaActions(quota, AA_PLAN_FACTS)), | ||
| ]; | ||
|
Comment on lines
+445
to
+448
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Whenever an eligible quota action exists, adding its task only to Useful? React with 👍 / 👎. |
||
| } | ||
| return { | ||
| view: buildAttention(feed, summary, Date.now(), diagnosis, watchdog), | ||
| view, | ||
| coverage, | ||
| orchestration: summary, | ||
| diagnosis, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For a pool with multiple windows, a higher-percentage short window can mask a qualifying longer window. For example, a 5-hour window at 99% resetting in two hours and a weekly window at 92% resetting in four days produce no action: the loop selects the 5-hour window, then rejects its reset without considering the weekly window. The same happens when the highest window has no reset recorded, a shape produced by
extractClinePassinquota-extract.ts. Filter for valid, distant resets before selecting the highest percentage so qualifying warnings remain visible.Useful? React with 👍 / 👎.