Skip to content

Fix JSON export type coercion and string formatting bugs#16

Closed
Copilot wants to merge 4 commits intomainfrom
copilot/check-astro-reports-json
Closed

Fix JSON export type coercion and string formatting bugs#16
Copilot wants to merge 4 commits intomainfrom
copilot/check-astro-reports-json

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 26, 2025

The Astro reports JSON export was producing schema-invalid output with malformed filenames and incorrect coordinate types. Four distinct bugs prevented proper data exchange with external GPT systems.

Changes

Coordinate Type Coercion

  • Export: Convert latitude/longitude from string to number via parseFloat() (lines 404-405, 421-422, 793-794, 810-811)
  • Import: Convert numeric coordinates back to strings via String() for form field compatibility (lines 469-471, 482-484)
// Before: schema violation
latitude: subjectA.latitude  // "40.7128" (string)

// After: schema compliant
latitude: parseFloat(subjectA.latitude) || 0  // 40.7128 (number)

String Template Formatting

  • Filenames: Removed trailing space in relational mode slug generation (lines 446, 836)

    • Before: `_${subjectB.name...} `john-doe_jane-smith _Symbolic...
    • After: `_${subjectB.name...}`john-doe_jane-smith_Symbolic...
  • Import parsing: Fixed date/time template literals with embedded spaces (lines 466-468)

    • Before: `${year} -${month} -${day} `"2025 -12 -25 "
    • After: `${year}-${month}-${day}`"2025-12-25"

All changes affect vessel/src/app/reports/page.tsx in handleDownloadJSON, handleDirectJSONExport, and handleImportJSON functions.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • fonts.googleapis.com
    • Triggering command: /usr/local/bin/node /usr/local/bin/node /home/REDACTED/work/Shipyard/Shipyard/vessel/node_modules/next/dist/compiled/jest-worker/processChild.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Check all recent updates that were done by Codex and make sure that nothing is broken. We were dealing mostly with the Astro reports JSON download for export to other GPTs and AI chats


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@vercel
Copy link
Copy Markdown

vercel Bot commented Dec 26, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
shipyard Ready Ready Preview, Comment Dec 26, 2025 6:07pm

Co-authored-by: DHCross <45954119+DHCross@users.noreply.github.com>
Co-authored-by: DHCross <45954119+DHCross@users.noreply.github.com>
Co-authored-by: DHCross <45954119+DHCross@users.noreply.github.com>
Copilot AI changed the title [WIP] Verify functionality of Astro reports JSON download Fix JSON export type coercion and string formatting bugs Dec 26, 2025
Copilot AI requested a review from DHCross December 26, 2025 18:11
@DHCross DHCross marked this pull request as ready for review December 26, 2025 18:12
@DHCross DHCross closed this Dec 30, 2025
@DHCross DHCross deleted the copilot/check-astro-reports-json branch December 30, 2025 03:39
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.

2 participants