Split a Next.js portfolio dashboard's metric trend widget direction into separate healthDirection and prMode settings, convert every trend query on the dashboards, and reject rows that still use metricDirection or omit either field.
- Version
- Category
- Engineering
- Model configurations
- 1
- Attempts
- 8
- Public trials
- 164 passed
- Median runtime
- 12m 50s
Instruction
From the portfolio team, after feedback on the People page: > all the people metrics on the people page should be **neutral** b/c > sensitivity around ppls lives and jobs - but with **no PRs** Our metric trend charts can't say that cleanly today. Each trend row carries one `metricDirection` (`higher | lower | neither`), and it does two jobs: it decides whether a move is good or bad (and who the top performer is), and it decides which way the PR (personal record) line points, with neutral metrics falling back to a record-high PR. We want those to be two separate settings on the metric trend widget: - `healthDirection`: `higher | lower | neither` - `prMode`: `none | recordHigh | recordLow` Make the widget use them, and go through every trend query on our own dashboards so each one emits both. No weird fallbacks and nothing deprecated: a trend row that still says `metricDirection`, or leaves either new field out, should fail validation rather than be guessed at. The league tables have their own `metricDirection`; leave those alone. On the People page every metric is neutral with no PRs. Cash Flow's Deferred Revenue / ARR stays neutral but keeps its record-high PR line. ## Environment PostgreSQL on localhost:5432 and the local database endpoint the app's driver uses are running when you start, and the dev env files point at the dev database. The dev database also holds synthetic data for every dashboard (metrics, deals, a worker roster, a sourcing funnel) for the portfolio's operating companies, so the dashboards draw their charts in the dev server.
Public trials
Results by model
| Model · harness | Mean reward | Range | ± SE | Attempts |
|---|---|---|---|---|
| Frontier model ACursor CLI | 50.0% | 0% – 100% | 18.9 pp | 8 |