feat: sync CLI with dashboard@v1.6.8 - #73
Open
cursor[bot] wants to merge 1 commit into
Open
Conversation
Syncs the CLI with dashboard@v1.6.8. This release is a security hardening pass on the phone-OTP flow (dashboard#241) and does not republish @photon-ai/dashboard-api — 1.6.1 remains the latest. main was pinned to @photon-ai/dashboard-api@1.2.0, so this catches the CLI up to the current public API surface. The 1.6.x bundled .d.ts exposes route response bodies as `Record<string, any>` (index signature only), which makes `.map((p) => ...)` implicitly-any. Fix pattern: define typed Project and SpectrumUser DTOs in src/lib/types.ts and cast at the API boundary in the two list commands. - projects list: (data ?? []) as Project[] - spectrum users list: (data?.users ?? []) as SpectrumUser[] - dropped the local SpectrumUser interface in favor of the shared one bun run check is green. Co-authored-by: citron <lcandy2@users.noreply.github.com>
Agent PR ReviewScenario: A — Initial review (PR opened by cursor[bot]) What's right
Concerns
Deferred (acknowledged in PR body)
Final noteClean minimum-viable typecheck fix for the 1.2.0 → 1.6.1 catch-up; marking ready and applying |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upstream version
v1.6.8@e80f455e22ccb06aba82a723744d648747c4ea6d@photon-ai/dashboard-api@1.6.1(unchanged — v1.6.8 is a security hardening pass on the phone-OTP flow, dashboard#241, and does not republish the api-public package)@photon-ai/dashboard-api@1.2.0, so this catches the CLI up to the current public surface.Routes added/removed/changed
Relative to the pinned 1.2.0 → 1.6.1 delta already documented in
UPSTREAM_DIFF.md(36 → 58 routes):GET/POST /api/projects/:id/members,DELETE /api/projects/:id/members/:memberUserId), Slack integration (GET/PUT/DELETE /api/projects/:id/slack+ installations), Spectrum avatar (POST /api/projects/:id/spectrum/avatar/upload+commit,DELETE), voice (PATCH /api/projects/:id/voice/imessage-enabled,GET /api/projects/:id/voice/settings,PATCH/DELETE /api/projects/:id/voice/sip-inbound), webhooks (GET/POST /api/projects/:id/webhooks,DELETE …/:webhookId), WhatsApp templates (GET/POST /api/projects/:id/whatsapp/templates,PATCH/DELETE …/:templateId), profile spectrum updates (PATCH /api/profile/spectrum-updates).GET /api/projects/:id/spectrum/avatar-upload-url(superseded by the new upload/commit pair).No new CLI commands in this PR — scope is minimum-viable typecheck fix, per the automation prompt's Priority 1/2. New routes remain follow-up work.
Snapshot changes
New runtime dependencies
Notes
The 1.6.x bundled
.d.tspublishes route response bodies asRecord<string, any>(index signature only). Dot access still compiles, but.map((p) => …)inprojects listandspectrum users listtrips TS7006 (implicit-any callback param). Fix pattern matches AGENTS.md's soft rules — typed DTOs live insrc/lib/types.tsand get cast at the API boundary:ProjectandSpectrumUserDTOs insrc/lib/types.ts.projects list:(data ?? []) as Project[].spectrum users list:(data?.users ?? []) as SpectrumUser[]; dropped the file-localSpectrumUserinterface in favor of the shared one.Checklist
@photon-ai/dashboard-apiversion bump, not hand editsbun run checkpasses locallyNeed help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.