// Sample patch notes for the browser mock. They deliberately contain markup
// that must NOT survive sanitizing (a script, an event handler, a javascript:
// link): if any of it shows up or runs, the sanitizer is broken.
export type NotesVariant = "full" | "no-roadmap";
const PROBES = `
`;
const ROADMAP = `
## Roadmap
### Next — 0.53
- Globally unique IDs across DHPs, the groundwork for merging offline edits.
- ODIAN assistant in the Chat panel, answering from the ontology.
- Pattern-of-life (Habits) summary available to the assistant by hex ID.
### Later
- Merge offline edits back into the DHP database, git-style.
- Search across entity documents from the map.
- NATO MIM governance workflow for exported data.
`;
const NOTES: Record = {
"0.52.0": `
# ODIAN 0.52.0
Released 2026-09-12 · required update for all operators on this DHP.
## Highlights
- **Mission assignment** — target → aircraft tasking now proposes a ranked list. The pick you make is recorded with the solve.
- **Habits panel** — a pattern-of-life summary for each aircraft, one click from the track card.
- **Offline map tiles** — the dark basemap \`protomaps_20260423\` ships with the install, so panning and zooming never need the network.
## Improvements
- Track trails draw about 3× faster above 5,000 live contacts.
- NATO MIM export validates against the SHACL shapes before it writes anything.
- The Chat panel keeps its scroll position while new messages arrive.
- Install and update resume from the last verified file.
## Fixes
- Fixed a crash when a vessel report had no MMSI.
- Vessel positions no longer freeze after an AIS feed outage.
- The replay time slider no longer skips the final minute.
${PROBES}
## Known issues
- The first launch after an install can take up to 60 s while Postgres warms its cache.
> Report problems from **Help → Send diagnostics** inside ODIAN, or read the [operator guide](https://docs.example.invalid/odian/0.52) and [this link](javascript:alert(1)).
`,
"0.51.0": `
# ODIAN 0.51.0
Released 2026-08-04.
## Highlights
- **Airspace layers** — restricted and danger areas draw from the DHP's AIXM import.
- **Track history** — scrub up to 72 h of recorded positions per contact.
## Improvements
- Startup is 40% faster on machines with a local database.
- Layer panel remembers which groups you collapsed.
## Fixes
- Fixed tooltips lingering after the map was dragged.
- Fixed a rare deadlock when two operators edited the same annotation.
`,
};
export function mockNotes(version: string, variant: NotesVariant): string {
const body = NOTES[version] ?? `# ODIAN ${version}\n\nNo notes were published for this version.\n`;
return variant === "full" ? `${body}${ROADMAP}` : body;
}