Skip to content

feat(control-panel): complete the miner command center (#129) - #836

Merged
JSONbored merged 1 commit into
mainfrom
feat/miner-command-center-completion
Jun 17, 2026
Merged

feat(control-panel): complete the miner command center (#129)#836
JSONbored merged 1 commit into
mainfrom
feat/miner-command-center-completion

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Closes #129.

Finishes the ~70%→100% the discovery sweep flagged remaining on the miner control panel.

What

  • Refresh decision pack from the web — new POST /v1/app/miner-dashboard/refresh: contributor-authed enqueue of the same decision-pack rebuild the MCP job runs, so a miner no longer has to run MCP locally to refresh. The rebuild is async, so the panel re-fetches after it lands.
  • Export / download the decision pack as JSON (decision-pack-<login>-<date>.json).
  • Recommendation-changelog modal — the dashboard API already attaches per-row old-vs-new diffs + re-run reasons to each next-action / repo-fit row; the inline cards truncate (2 reasons), the new modal shows the full old-vs-new diff and every re-run reason in one place.

Boundaries

Public-safe: deterministic signals only — no payout/reward/trust language. The refresh endpoint is contributor-authed (same gate as the dashboard read) and fully covered. Cross-cutting loading/empty/retry states stay tracked in #793 per the discovery sweep.

Verification

backend typecheck ✓ · UI lint ✓ · UI typecheck ✓ · UI build ✓ · backend suite 1995 passed / 1 skipped (pre-existing pngjs visual-agent skip) · UI suite 7 passed · new refresh-endpoint coverage clean (400 / 403 / 202 / session-actor paths).

Finishes the ~70% the discovery sweep flagged remaining on the miner
control panel:

- Refresh decision pack from the web (new POST /v1/app/miner-dashboard/
  refresh): contributor-authed enqueue of the same decision-pack rebuild
  the MCP job runs, so a miner no longer has to run MCP locally. Async,
  so the panel re-fetches after it lands.
- Export / download the decision pack as JSON.
- Recommendation-changelog modal: the API already attaches per-row
  old-vs-new diffs + re-run reasons; the inline cards truncate, the modal
  shows the full old-vs-new diff and every re-run reason.

Public-safe: deterministic signals only — no payout/reward language. The
refresh endpoint is fully covered; cross-cutting loading/empty states
remain tracked in #793.

Closes #129.
@dosubot dosubot Bot added the size:L label Jun 17, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 17, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
gittensory-ui 67cefe4 Commit Preview URL

Branch Preview URL
Jun 17 2026, 08:10 PM

@ghost

ghost commented Jun 17, 2026

Copy link
Copy Markdown

Note

Gittensory Gate skipped

PR closed before full evaluation. No late first comment was created.

Signal Result Evidence Action
Gate result ⚠️ Skipped #836 is no longer open. No action.

💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.

@ghost ghost added the gittensory:reviewed label Jun 17, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@ghost

ghost commented Jun 17, 2026

Copy link
Copy Markdown

gittensory · advisory review

Reviewed 3 changed file(s) — two independent AI reviewers.

Changed files: apps/gittensory-ui/src/components/site/app-panels/miner-panel.tsx, src/api/routes.ts, test/integration/api.test.ts

Suggested action: 🛠️ Request changes. (reviewers split: request changes / merge) Address the suggestions below before merging.

Reviewer A · gpt-oss-120b — recommends 🛠️ request changes
The PR adds UI functionality for refreshing, exporting, and viewing a changelog of the miner decision pack, and introduces a new API endpoint to trigger a decision‑pack rebuild, with corresponding integration tests.

Suggestions

  • Add unit/integration tests for the new MinerPanel UI components (MinerPanelActions, ChangelogDialog, collectChangelog) to meet the 97% patch‑coverage requirement.
  • Verify that the Dialog component includes appropriate ARIA attributes (e.g., aria-labelledby) for full accessibility compliance.
  • Consider handling non‑JSON error responses in refreshPack to avoid unhandled exceptions.

Worth double-checking

  • Reduced test coverage for the newly added UI code could cause CI failures.
  • Potential accessibility gaps in the new dialog if ARIA labeling is incomplete.

Reviewer B · mistral-small-3.1-24b-instruct — recommends ✅ merge
This PR adds a 'Miner Command Center' to the Gittensory UI, allowing miners to refresh, export, and view the changelog of their decision packs. The changes are well-structured and follow the project's conventions. The API and tests are updated accordingly.

Suggestions

  • Consider adding a loading state or spinner for the refreshPack function to improve user feedback during the refresh process.
  • Ensure that the exportPack function handles edge cases, such as when the data is null or undefined.
  • Add a test to verify the behavior of the refreshPack function, including success and failure scenarios.
  • Consider adding a confirmation dialog before exporting the decision pack to prevent accidental exports.
  • Ensure that the changelog dialog is accessible and responsive on different screen sizes.

Worth double-checking

  • Verify that the refreshPack function correctly handles authentication and authorization.
  • Ensure that the exportPack function does not expose sensitive information.
  • Check that the changelog dialog correctly displays the changes and reasons for re-running the decision pack.

Warning

Could not capture a preview of the changed route(s) — review the rendered page manually before merging.

Before = production · After = this PR's preview deploy.

Route Viewport Before After
/ desktop before desktop after desktop
mobile before mobile after mobile

@codecov

codecov Bot commented Jun 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.56%. Comparing base (bc090a1) to head (67cefe4).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #836   +/-   ##
=======================================
  Coverage   96.56%   96.56%           
=======================================
  Files          98       98           
  Lines       14175    14184    +9     
  Branches     5169     5172    +3     
=======================================
+ Hits        13688    13697    +9     
  Misses        105      105           
  Partials      382      382           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JSONbored JSONbored self-assigned this Jun 17, 2026
@JSONbored
JSONbored merged commit 648b8f9 into main Jun 17, 2026
22 checks passed
@JSONbored
JSONbored deleted the feat/miner-command-center-completion branch June 17, 2026 19:42
@JSONbored
JSONbored restored the feat/miner-command-center-completion branch June 17, 2026 20:09
@JSONbored
JSONbored deleted the feat/miner-command-center-completion branch June 17, 2026 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(control-panel): add miner command center

1 participant