Skip to content
This repository was archived by the owner on Jun 4, 2026. It is now read-only.

Review completed: Accept header fixes and profile manager integration verified - #2

Closed
christse with Copilot wants to merge 1 commit into
mainfrom
copilot/sub-pr-1
Closed

Review completed: Accept header fixes and profile manager integration verified#2
christse with Copilot wants to merge 1 commit into
mainfrom
copilot/sub-pr-1

Conversation

CopilotAI commented Feb 4, 2026

Copy link
Copy Markdown

Reviewed the updated branch per @christse's request. The previously flagged issues have been resolved.

Changes Verified

  • Accept header logic: Correctly implemented in both watch.ts and realm-sync-base.ts

    • .json files → application/vnd.card+json
    • .gts files → application/vnd.card+source
    • Other files → */*
  • Profile manager integration: Module added in commit 23992b6

    • Provides credential management with environment variable fallback
    • Integrated in watch.ts and validateMatrixEnvVars()
constfileResponse=awaitfetch(fileUrl,{headers: {'Authorization': realm.jwt,'Accept': file.endsWith('.json')
? 'application/vnd.card+json'
: file.endsWith('.gts')
? 'application/vnd.card+source'
: '*/*',},});

Minor Notes

  • Unused variables in profile-manager.ts (lines 9, 13, 342) - cosmetic only
  • Pre-existing build error in touch.ts unrelated to these changes

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

CopilotAI changed the title [WIP] Fix Accept header for .gts files in watch commandReview completed: Accept header fixes and profile manager integration verifiedFeb 4, 2026
CopilotAI requested a review from christseFebruary 4, 2026 00:34
Base automatically changed from fix/gts-accept-header to mainFebruary 13, 2026 17:30
@christse
christse removed their request for review February 13, 2026 18:18
christse pushed a commit that referenced this pull request Apr 20, 2026
Six fixes in one commit, addressing every Copilot comment except #7
(dead code, deferred to a later cleanup pass).
#4 — manifest shape mismatch (critical):
push.ts was still reading/writing the old manifest format
(files[path] = hashString) while pull.ts and sync.ts use the new
{localHash, remoteMtime} shape. push now uses the new shape,
migrates old manifests on read (mirrors sync.ts detector), and
refreshes remoteMtime via getRemoteMtimes() after a successful
upload so the next pull/sync sees a consistent picture.
#3 — partial-success manifest (important):
In --batch mode we were marking every instance as synced when
result.uploaded > 0, even if some failed. Now we derive failed
paths from result.errors and only add successes to the manifest.
Failed uploads stay out and get retried on the next run.
#6 — ATOMIC_SOURCE_EXTENSIONS gap (important):
EXTENSION_MAP was missing .tsx/.jsx/.cjs/.scss/.less/.sass, so
those extensions got application/octet-stream and were routed
through individual POST instead of /_atomic despite being listed
as atomic-source compatible. Now mapped to
application/typescript/javascript and text/x-* respectively, so
isTextFile() returns true and they take the atomic path.
#2 — CLI --version out of sync:
program.version() was hardcoded to '1.0.0' while package.json is
at 1.0.1. Now reads from package.json via createRequire so
boxel --version stays accurate on every release.
#1 — --batch-size NaN guard:
parseInt on bad input (e.g. "abc") returned NaN, which bypasses
`?? 10` and flows into the uploader as NaN. Now uses a
parsePositiveInt parser that throws InvalidArgumentError with
a friendly message on non-positive-integer input.
#5 — invalid-JSON test expectation:
The test expected data.type='file' but the code (correctly) emits
'source' because /_atomic only accepts 'card' and 'source'
resource types. Test updated to match the correct contract.
All 164 tests pass (was 163/164 before this commit).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
christse pushed a commit that referenced this pull request Apr 20, 2026
Six fixes in one commit, addressing every Copilot comment except #7
(dead code, deferred to a later cleanup pass).
#4 — manifest shape mismatch (critical):
push.ts was still reading/writing the old manifest format
(files[path] = hashString) while pull.ts and sync.ts use the new
{localHash, remoteMtime} shape. push now uses the new shape,
migrates old manifests on read (mirrors sync.ts detector), and
refreshes remoteMtime via getRemoteMtimes() after a successful
upload so the next pull/sync sees a consistent picture.
#3 — partial-success manifest (important):
In --batch mode we were marking every instance as synced when
result.uploaded > 0, even if some failed. Now we derive failed
paths from result.errors and only add successes to the manifest.
Failed uploads stay out and get retried on the next run.
#6 — ATOMIC_SOURCE_EXTENSIONS gap (important):
EXTENSION_MAP was missing .tsx/.jsx/.cjs/.scss/.less/.sass, so
those extensions got application/octet-stream and were routed
through individual POST instead of /_atomic despite being listed
as atomic-source compatible. Now mapped to
application/typescript/javascript and text/x-* respectively, so
isTextFile() returns true and they take the atomic path.
#2 — CLI --version out of sync:
program.version() was hardcoded to '1.0.0' while package.json is
at 1.0.1. Now reads from package.json via createRequire so
boxel --version stays accurate on every release.
#1 — --batch-size NaN guard:
parseInt on bad input (e.g. "abc") returned NaN, which bypasses
`?? 10` and flows into the uploader as NaN. Now uses a
parsePositiveInt parser that throws InvalidArgumentError with
a friendly message on non-positive-integer input.
#5 — invalid-JSON test expectation:
The test expected data.type='file' but the code (correctly) emits
'source' because /_atomic only accepts 'card' and 'source'
resource types. Test updated to match the correct contract.
All 164 tests pass (was 163/164 before this commit).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@christse