feat(markdown): render frontmatter in file previews - #160
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 37acf335e1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| import * as Option from "effect/Option"; | ||
| import * as Schema from "effect/Schema"; | ||
|
|
||
| const FrontmatterDocument = fromYaml(Schema.Record(Schema.String, Schema.Json)); |
There was a problem hiding this comment.
Preserve large integer values in YAML frontmatter
When a mapping contains an integer outside JavaScript's safe range, the YAML transformation converts it to a number and Schema.Json accepts the already-rounded result. For example, id: 9007199254740993 is displayed as 9007199254740992 on every preview surface, silently changing identifier-like metadata. Preserve the scalar lexeme or otherwise parse integers without losing precision before building the display value.
Useful? React with 👍 / 👎.
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
What Changed
Backports pingdotgg/t3code#8202.
Why
Markdown previews currently show frontmatter as raw delimiters and YAML. This matches GitHub's metadata-table presentation while keeping parsing shared and client rendering local.
UI Changes
Before:
After:
Verification
Checklist
Made with GPT-5.6 Sol using the Codex harness in T3 Code.