Skip to content

release: promote canary to main (TypeScript migration) - #21

Merged
ezralazuardy merged 7 commits into
mainfrom
canary
Aug 7, 2026
Merged

release: promote canary to main (TypeScript migration)#21
ezralazuardy merged 7 commits into
mainfrom
canary

Conversation

@ezralazuardy

Copy link
Copy Markdown
Member

Summary

Promote canarymain after the TypeScript migration and related hardening landed on canary via #20 and earlier canary commits.

Included (7 commits ahead of main)

Verify

export PATH="$HOME/.nvm/versions/node/v22.22.2/bin:$HOME/.bun/bin:$PATH"
bun run check && bun run test:run && bun run build

Notes

  • Version remains v0.0.82 (no bump in this promote).
  • After merge: sync canary to main so both stay on the same commit (per ops rule).
Open in Web Open in Cursor 

ezralazuardy and others added 7 commits July 24, 2026 21:13
Cache-first shell + Response.error()/controllerchange reload could reject
respondWith after idle; prefer network then offline fallback and never surface
a network-error response for documents or images.

Co-authored-by: Cursor <cursoragent@cursor.com>
Align README/AGENTS/.agents with f1d4861 (gotcha §34) and drop stale middleware/protected-health claims.

Co-authored-by: Cursor <cursoragent@cursor.com>
Point 00-engine invariants at live chat.ts/accountFallback/stream paths; sync Unreleased SW/lint notes and plan statuses from explore audits.

Co-authored-by: Cursor <cursoragent@cursor.com>
Re-enable Next.js Link prefetch for sidebar nav except /usage (day-picker CSS). Add dashboard loading.tsx so slow RSC/cold canary wakes show immediate feedback.

Co-authored-by: Cursor <cursoragent@cursor.com>
Port cloud-dev install/start scripts and Cursor Cloud agent notes
(including the Node >=22.18 vitest caveat) from the cloud-env branch
so canary is the default base for Cloud worktrees.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Install DietrichGebert/ponytail skills in-repo so Cursor Cloud Agents
discover /ponytail (and review/audit/debt/gain/help). .cursor/ is
gitignored; .agents/skills/ is the durable discovery path.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
* chore(open-sse): rename JS→TS and split translator registry

Mechanical conversion of open-sse/ to TypeScript (154 modules), replace
Bun require() registration with createRequire + registry.ts, and AST-annotate
untyped params/catch bindings. Ambient open-sse.d.ts removed so tsc owns types.

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* Fix request translator TypeScript inference

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* Fix executor TypeScript rename errors

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* Fix open-sse utils TypeScript errors

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* Fix open-sse handler TypeScript errors

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* Fix open-sse scoped TypeScript typing errors

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* Clear remaining open-sse usage typing errors

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* Fix open-sse translator transformer types

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* Fix open-sse TypeScript result types

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* Fix open-sse overload compatibility

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* feat(ts): finish open-sse + tests TypeScript migration

- open-sse fully TS (loaders/registry, included in root tsc)
- tests renamed to .ts; fs path audits updated
- remove ambient open-sse.d.ts; export real handler result types
- add .oxfmtrc.json (silence oxfmt config warning)
- update AGENTS.md: open-sse is typed, no longer frozen JS

Note: public/sw.js remains JS (browser service worker).

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* fix(open-sse): add COMMANDCODE format + registry completeness test

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* fix(open-sse): type usage format fields

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* docs(agents): sync TS migration reality; remove annotate scripts

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* fix(open-sse): tighten translator registry signatures

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* fix(open-sse): remove BaseExecutor any index signature

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* fix(open-sse): type core handler implementations to Result types

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* fix(build): green production build after open-sse TS migration

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* fix(build): green production build after open-sse TS migration

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* fix(build): green production build after open-sse TS migration

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* fix(build): green production build after open-sse TS migration

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* fix(open-sse): catch unknown hygiene on stream paths

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* chore(open-sse): post-migration cleanup (tsconfig/cloud shim/init)

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* fix(dev): run gen:open-sse-shims before next dev

QA [minor]: fresh-clone `bun run dev` relied on implicit .js->.ts
resolution that the build needed explicit shims for. Mirror the build
hook in dev.

* refactor(open-sse): reduce any density in protobuf/usage/tokenRefresh hotspots

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* chore(ts): convert remaining sw/config/scripts to TypeScript

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* chore(ts): use cts for postcss config

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* chore(ts): format generated sw tooling

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* fix(ts): remove redundant memory content guard

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* chore(ts): format generated service worker

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* fix(ts): narrow chat core dynamic fields

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* fix(ts): type chat core raw request boundary

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* chore(ts): format open-sse TypeScript

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* chore(ts): format remaining open-sse executors

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* chore(ts): format open-sse request helpers

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* chore(ts): format remaining open-sse helpers

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* chore(ts): format final open-sse files

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* chore(ts): format open-sse provider helpers

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* chore(ts): format open-sse search helpers

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* chore(ts): format open-sse usage service

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* fix(ts): narrow open-sse strict checks

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* fix(ts): clean remaining open-sse strict checks

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* fix(ts): keep streaming raw request naming valid

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* chore(lint): tighten oxlint rules for open-sse

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* fix(ts): guard stream line decloak input

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* refactor(open-sse): continue any reduction across stream/usage/translators/executors

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* refactor(open-sse): fix strict types after any reduction

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* refactor(open-sse): remove any from translators and helpers

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* refactor(open-sse): preserve provider model typings

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* refactor(open-sse): keep no-any helper types compatible

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* chore(open-sse): clear cursor executor lint

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* refactor(open-sse): remove any from executors and request utils

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* chore(open-sse): unblock strict check for dynamic files

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* fix(open-sse): restore strict type compatibility

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* fix(open-sse): type image provider adapters

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* style(open-sse): format fal image adapter

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* style(open-sse): format image adapter base

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* fix(open-sse): type cloudflare image adapter

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* refactor(open-sse): remove any from search/image/chat helpers

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* refactor(open-sse): remove any from combo/qoder/qwen

Replace :any/as any with unknown, Record<string, unknown>, and
shared Executor* types in combo, qoder, qoderModels, and qwen.

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* refactor(open-sse): remove any from stream/proxy/error utils

Replace :any/as any with unknown, Record<string, unknown>, and
narrow interfaces across stream, proxy, error, cloaking, and
related util modules without changing runtime behavior.

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* refactor(open-sse): remove any from rtk and remaining executors

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* fix(embeddings): restore idempotent /embeddings de-dup in openaiCompatNode buildUrl

QA [minor]: baseUrl configured as a full embeddings URL (.../v1/embeddings)
no longer de-dups; re-appending produced .../embeddings/embeddings -> 404.
Keep the trailing-slash strip, re-add the /embeddings strip before appending.

* refactor(open-sse): remove any from chat/fetch handlers

Replace :any/as any with unknown, Record<string, unknown>, and local
interfaces across non-streaming/streaming chat, fetch, responses, image,
embeddings, and TTS core handlers without changing runtime behavior.

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* refactor(open-sse): mop remaining any to zero

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* fix(ts): repair cascading types after open-sse any removal

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* refactor(src): strip redundant const: any annotations

Remove poison `: any` on const/let bindings where TypeScript can
infer from the initializer; convert catch clauses to unknown.

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* revert: undo broken mechanical any-strip

Line-oriented rewrite dropped newlines and corrupted large dashboard
clients. Prefer file-by-file typing via agents instead.

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* refactor(src): remove any from BasicChat/ProxyPools/ProviderDetail

Replace poison-annotated JS→TS `: any` with proper interfaces,
typed useState/useRef, React event types, and unknown+narrowing.
No behavior change.

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* refactor(src): remove any from Profile/Memory/cache/logs clients

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* refactor(src): remove any from MediaProviderDetail/Endpoint/ProviderLimits

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* refactor(src): remove any from shared components

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* refactor(src): remove any from Providers/Topology/Health/Combos

Eliminate typed any from ProvidersClient, ProviderTopology,
MediaProviderComboClient, HealthClient, CombosClient, and
RequestDetailsTab with proper interfaces, useState generics,
React event types, and unknown+narrow — no behavior change.

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* refactor(src): remove any from api routes and lib

Replace typed any across API routes, lib, oauth services, and shared
non-dashboard modules with unknown narrowing, Request/Promise params,
and domain types. Leave FFI/ambient any only with todo(ts) markers
(sqlite Statement rows, EdgeRuntime caches, prop-types).

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* refactor(src): tighten ambient/FFI any leftovers

Type SqliteStatement with generics (all<T>/get<T>/run→RunResult),
use DOM CacheStorage instead of caches: any, and replace the
prop-types any shim with a minimal PropTypesAPI declaration.

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* refactor(src): mop remaining dashboard any

Remove typed any from remaining dashboard usage/providers/logs/health
files with proper interfaces and React event types; fix cascading tsc
errors in UsageStats, OAuthModal, EditConnectionModal, and embedding modal.

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

* fix(lint): clear oxlint/tsc fallout after any removal

Drop unused React type imports, prefer !== / typeof guards, and
tighten ProviderLimits key filtering for noUncheckedIndexedAccess.

Co-authored-by: Ezra Wijaya <ezra@lazuardy.tech>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Lazuardy Tech [Ops] <ops@lazuardy.tech>
});
};

const transformStream = new TransformStream<Uint8Array, Uint8Array>(transformer);
});
};

const transform = new TransformStream(transformer);
credentials: unknown,
) {
// todo(ts): request translator registry may pass credentials to JS-era translators.
const gemini = (openaiToGeminiRequest as unknown)(model, body, stream, credentials);
} catch (err) {
const fakeResp = new Response(JSON.stringify({ error: { message: err.message } }), {
} catch (err: unknown) {
const fakeResp = new Response(JSON.stringify({ error: { message: errorMessage(err) } }), {
@ezralazuardy
ezralazuardy marked this pull request as ready for review August 7, 2026 15:33
@lazuardytech-qa lazuardytech-qa added chore Maintenance tasks enhancement New feature or request labels Aug 7, 2026
@lazuardytech-qa

Copy link
Copy Markdown
Member

QA Analysis Report

Scope: Promote canarymain — TypeScript migration of open-sse + tests (#20), vendored ponytail skills (#19), Cursor Cloud helpers (#17), SW network-first navigation, dashboard prefetch/loading UI, docs sync.

Summary

This is a release promote bringing canary's accumulated changes to main. The bulk (TS migration, skills, cloud helpers) was already reviewed in #20/#19/#17; the new direct-to-canary commits are the SW network-first navigation fix and the dashboard prefetch/loading UI. The PR diff exceeds GitHub's 300-file API limit, so per-commit diffs were reviewed instead. CI is fully green and the PR is mergeable. Recommendation: approve.

Findings

  • [nit] src/sw/sw.ts:134 - emptyImageResponse returns HTTP 200 with an empty body; some clients render this as a broken-image glyph. A 1×1 transparent placeholder would render cleaner. Low impact — this is a last-resort offline fallback for images.
  • [question] src/sw/sw.ts:245 - network-first navigation with a 5s timeout means idle cold-starts (15-30s per docs) will time out and serve the cached shell instead. This matches the stated ERR_FAILED fix intent, confirming it's deliberate.

Looks good

  • SW navigation handler has correct try/catch nesting, cache→offline fallback, tolerated quota failures on cache put, and a regression test for the AbortError path.
  • src/app/(dashboard)/loading.tsx uses aria-busy/aria-label — good accessibility on the route-loading UI.
  • TS migration is type-clean (any driven to zero), and cloud/src/types.d.ts now ships typed open-sse/* declarations instead of the any wildcard.

Automated review by @lazuardytech-qa. Re-triggered on new commits.

@lazuardytech-qa lazuardytech-qa left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approved — promote is mergeable, CI green, no blocker or major findings. See analysis comment for nits.


Automated review by @lazuardytech-qa. Re-triggered on new commits.

@ezralazuardy
ezralazuardy merged commit 2b73633 into main Aug 7, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance tasks enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants