Skip to content

fix(project-file): preserve valid values during decoding - #286

Merged
incognitojam merged 1 commit into
mainfrom
styal/harden-project-file-decoding
Sep 29, 2026
Merged

incognitojam merged 1 commit into
mainfrom
styal/harden-project-file-decoding

Conversation

@incognitojam

Copy link
Copy Markdown
Owner

A single invalid value in t3.json currently causes clients and the server to discard the entire project file, hiding unrelated actions, defaults, and project icons.

This adds granular recovery: malformed JSON and non-object roots remain invalid, while invalid top-level fields are omitted, invalid optional action fields fall back to defaults, and only actions missing required fields are dropped. Unknown keys are treated as ignored values and surface a partial-file warning, so typos do not fail silently while valid siblings remain available.

Before

Before: the unknown field is silently ignored without a warning

After

After: valid actions remain available and Settings warns about ignored values

Verification

  • 27 focused contract, shared, and server tests passed
  • Contracts, shared, server, web, and mobile typechecks passed
  • Verified partial recovery and the Settings warning in the web client

Written by an agent (T3 Code, gpt-5.6-sol).

@github-actions github-actions Bot added the size:L label Sep 1, 2026
@incognitojam
incognitojam force-pushed the styal/harden-project-file-decoding branch from d7ebdfb to cf12782 Compare September 1, 2026 18:47
@incognitojam
incognitojam marked this pull request as draft September 3, 2026 21:35
incognitojam added a commit that referenced this pull request Sep 25, 2026
## Problem

Finishing an unrelated agent turn could reload an open PR's Code tab. A
refresh also hid the diff behind a loading skeleton.

## Change

- Refresh the diff when that PR changes or the reader requests it.
- Keep the current diff visible while the replacement loads. If the new
first page differs, discard old continuation pages before loading more.
- Pause line-comment actions during the replacement.

## Checked

- On PR #286, all eight files stayed visible during refresh. Switching
to a commit diff and back worked.
- On PR #87, a resolved five-comment conversation stayed visible during
refresh. With a locally substituted diff response, the Code tab kept the
old two-file diff while loading, then showed the new three-file diff and
retained the conversation. A real refresh restored the two-file diff.
- Focused tests passed (113), as did web typecheck, targeted lint and
format checks, and ledger validation. No browser or server errors
appeared.

An agent turn and an inline conversation on a current hunk were not
exercised in the browser.

## Evidence

[Before/after
video](https://github.com/user-attachments/assets/87f158f9-26eb-4c31-835a-eb3bd7f458f9):
the left side clears during refresh; the right side keeps the diff
visible.

| Before | After |
| --- | --- |
| ![Diff replaced by loading
skeleton](https://github.com/user-attachments/assets/fd71c682-b466-4182-9ead-7f675152b159)
| ![Diff stays visible during
refresh](https://github.com/user-attachments/assets/0b2eeb83-951e-43c0-b170-453154f2a8ce)
|

---
Written by an agent (Codex, GPT-6).
@incognitojam
incognitojam force-pushed the styal/harden-project-file-decoding branch from cf12782 to 3e2c742 Compare September 29, 2026 19:44
@incognitojam
incognitojam marked this pull request as ready for review September 29, 2026 19:44
@incognitojam
incognitojam merged commit 39bd97c into main Sep 29, 2026
26 of 27 checks passed
@incognitojam
incognitojam deleted the styal/harden-project-file-decoding branch September 29, 2026 20:09
incognitojam pushed a commit that referenced this pull request Oct 10, 2026
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>

(cherry picked from commit 568c9bc)

Fork adaptation: Keep granular project-file recovery from fork #286 rather than restoring all-or-nothing decoding, and backfill its ledger entry. Preserve Antigravity reasoning options, the fork's import-aware test mocks and relocated imports, and styal Link messages while applying upstream Effect helper cleanup.

Upstream-PR: 13536
Fork-Feature: antigravity-reasoning-effort, data-import-from-t3-code, fork-managed-link, project-file-partial-recovery
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant