[codex] Fix architecture diagram viewing#18
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6f4f7df3d3
ℹ️ 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".
| `| Cache | Hot reads, session state, computed summaries, and stampede protection | ${fallback(v.cachingStrategy, p.platform.caching ? "Cache required; define owner, TTL, and invalidation." : "Defer until measured.")} |`, | ||
| `| Primary data | Transactional source of truth and migration ownership | ${p.platform.database} (${p.platform.dataShape}) |`, | ||
| `| Queue / events | Async jobs, retries, dead-letter handling, and workflow consumers | ${fallback(v.queueStrategy, p.platform.eventDriven || p.platform.backgroundJobs ? "Managed queue/event bus required." : "Introduce when long-running work appears.")} |`, |
There was a problem hiding this comment.
Sanitize strategy text before placing it in table cells
This section now injects v.cachingStrategy / v.queueStrategy directly into a GFM table, but both values are free-form textarea input and can contain newlines or |. In that case the row is split/terminated by the markdown parser, so the fallback architecture table (and sometimes following markdown structure) renders incorrectly. Escaping table metacharacters (and normalizing line breaks to <br>) is needed before interpolating these fields into table rows.
Useful? React with 👍 / 👎.
| <div className="min-h-0 flex-1 overflow-auto p-4"> | ||
| {renderSvg("h-auto max-w-none", { width: Math.max(activeLayout.width, 1100) })} | ||
| </div> |
There was a problem hiding this comment.
Use distinct marker ids for expanded diagram SVG
When expanded is true, the component renders the diagram SVG twice (inline and modal) via renderSvg, and both instances define the same <marker id={markerId}> while edges use markerEnd="url(#...)". That produces duplicate IDs in one DOM, and SVG fragment resolution with duplicate IDs is browser-dependent, which can make arrowheads resolve unpredictably in the enlarged view. Assign separate marker IDs per rendered SVG instance.
Useful? React with 👍 / 👎.
Summary
Validation
Browser note: no Chrome/headless testing used.