Skip to content

Smooth weekly pace gap#1120

Open
Komzpa wants to merge 1 commit into
Soju06:mainfrom
Komzpa:kom/issue-999-weekly-pace-smoothing
Open

Smooth weekly pace gap#1120
Komzpa wants to merge 1 commit into
Soju06:mainfrom
Komzpa:kom/issue-999-weekly-pace-smoothing

Conversation

@Komzpa

@Komzpa Komzpa commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add a configurable weekly pace gap smoothing window (15m/30m/1h/2h/4h, default 30m)
  • compute smoothed pace gap metrics from recent weekly quota samples while preserving the live "Used now" value
  • expose the setting in Routing settings and have the Weekly credits pace card display the smoothed gap

Closes #999

Verification

  • uv run ruff check app/modules/dashboard/weekly_pace.py app/modules/settings app/modules/dashboard/service.py app/modules/dashboard/schemas.py app/db/models.py tests/integration/test_dashboard_overview.py tests/integration/test_settings_api.py
  • uv run pytest tests/integration/test_dashboard_overview.py::test_dashboard_projections_weekly_credit_pace_forecast_uses_recent_slope_not_full_window_average tests/integration/test_dashboard_overview.py::test_dashboard_projections_weekly_credit_pace_smooths_displayed_gap tests/integration/test_dashboard_overview.py::test_dashboard_projections_weekly_credit_pace_uses_configured_working_days tests/integration/test_settings_api.py::test_settings_api_get_and_update tests/integration/test_settings_api.py::test_settings_api_rejects_invalid_weekly_pace_smoothing_minutes -q
  • bun run test -- src/features/settings/schemas.test.ts src/features/settings/components/routing-settings.test.tsx src/features/dashboard/components/weekly-credits-pace-card.test.tsx src/features/dashboard/utils.test.ts
  • bun run lint -- src/features/settings/schemas.ts src/features/settings/payload.ts src/features/settings/components/routing-settings.tsx src/features/settings/components/routing-settings.test.tsx src/features/dashboard/schemas.ts src/features/dashboard/utils.ts src/features/dashboard/components/weekly-credits-pace-card.tsx src/features/dashboard/components/weekly-credits-pace-card.test.tsx src/features/dashboard/utils.test.ts src/test/mocks/factories.ts
  • make migration-check
  • openspec validate smooth-weekly-pace-gap --strict

@github-actions github-actions Bot added the db migration PR changes Alembic database migrations; maintainer must coordinate merge order label Jun 30, 2026
@Komzpa

Komzpa commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fe2410e1ce

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread frontend/src/features/settings/schemas.ts
Comment thread app/modules/dashboard/weekly_pace.py Outdated
@Soju06 Soju06 added the 🤖 codex: needs work [@codex review] raised an issue label Jun 30, 2026
@Komzpa Komzpa force-pushed the kom/issue-999-weekly-pace-smoothing branch from fe2410e to c477d6a Compare June 30, 2026 23:33
@Komzpa

Komzpa commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: c477d6a70f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Komzpa Komzpa removed the 🤖 codex: needs work [@codex review] raised an issue label Jun 30, 2026
@Soju06 Soju06 added the 🤖 codex: ok [@codex review] says no issues found. label Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🤖 codex: ok [@codex review] says no issues found. db migration PR changes Alembic database migrations; maintainer must coordinate merge order

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: smooth Weekly Credits Pace gap with configurable averaging window

2 participants