URL Config Sharing
Dreapex TMM can encode an entire model snapshot into the URL hash:
https://tmm.dreapex.com/#config=<base64url>
When a user opens such a link, the front end restores the model to the state carried by the URL before the page finishes loading. This is a zero-backend reproduction path for remote collaboration: send the link, the recipient sees the same structure, optics, sweep, and optimizer configuration.
When to Use
| Scenario | Recommended |
|---|---|
| Drop a one-click reproduction link in chat | URL sharing |
| Cross-machine migration of a complete model + compute preferences | Prefer .tmm file |
| AI agent in a remote browser hands a result back to the user | URL sharing (link generated by the agent) |
| Long-term archival | .tmm file |
URL sharing is a one-shot, short-term reproduction tool: payloads have a size cap, URLs grow with model complexity, and they get truncated when forwarded through chat tools. For long-term storage, prefer .tmm files.
URL Payload Shape
The encoded object equals the localStorage autosave snapshot plus an optional settings:
{
version: 1,
savedAt: string,
data: {
structure: StructureElement[],
optics: Optics,
surroundings: Surroundings,
sweepList: SweepItem[],
optimizer: {
objectives: OptimizationObjective[],
variables: OptimizationVariable[],
algorithmSettings: GridOptimizationSettings
}
},
// Only present in URL sharing; not in localStorage snapshots
settings?: SettingsState
}
Pipeline: JSON → DEFLATE → base64url → URL hash. No backend call at any step.
Import Rules
| Data category | Import behavior |
|---|---|
Model data (data) | Applied directly with per-module Zod validation; failed modules fall back to defaults |
| Performance settings | A confirmation dialog appears only if at least one shared value is greater than the current value; remaining fields are silently skipped |
| Theme, language, other preferences | Not imported (treated as local user preferences) |
| Computed results | Not included (large and recomputable) |
Only four performance fields are eligible for import: maxConcurrentRequests, maxSweepCombinations, maxCalculationDataPoints, maxSingleRequestDataPoints. The pattern lets the sender raise the user's safety thresholds enough to fully run the shared model — without quietly lowering settings the user has already configured.
Priority vs. Local Autosave
If the URL hash contains #config= at startup:
- URL config import runs first.
- Even if it fails, and even if the hash is immediately cleared, the
localStorageautosave restore is skipped for this session. - Subsequent edits resume the normal autosave flow.
This respects the user's explicit intent to load a shared link, preventing old autosave data from silently overwriting the freshly imported model.
Size Safety
If the encoded base64url string exceeds 50,000 bytes, link generation is rejected. Typical configurations compress to 0.4–4 KB, well below the cap; the limit usually only matters when very deep stacks, large sweep combinations, and a large incident-spectrum file all stack up.
Agent / Remote Browser Side
With the debug bridge enabled (?simulation_debug=1 in the URL), the browser console exposes:
const url = window.__SIMULATION_DEBUG__.getShareableUrl()
This returns the full shareable link for the current model, so a remote AI agent can hand it back to the user. Production pages do not expose this interface by default.
Failure Toasts
| Toast | Meaning | What to check |
|---|---|---|
Loaded configuration from shared link | All modules imported successfully | Nothing |
Shared link partially imported | Some modules had invalid shape and fell back to defaults | Inspect the module list in the toast |
Shared link import failed | Payload corrupted or undecodable | URL was likely truncated in transit; ask sender to resend the full URL |
When to Pick .tmm vs URL
| Dimension | .tmm file | URL sharing |
|---|---|---|
| Practical size limit | Effectively none | 50,000 bytes after base64 |
| Truncation risk | None | High in chat / email previews |
| Coverage | Model snapshot only | Model snapshot + selected performance settings |
| Archival-friendly | Yes | No |
| One-click reproduction | No (recipient must download) | Yes (open link, done) |
A common combination: send the link for fast reproduction, and archive the matching .tmm file in the project directory.