--- id: "dd84f6f1-250d-4973-93aa-de80b92f96f8" name: "SIMnet Discovery" micro_summary: "How we discovered the reliable tool_launch redirect pattern for navigating Canvas → SIMnet assignments, what approaches failed, and the timing chain that works." status: "resolved" see_also: [] scope: "Discovery methodology for navigating from Canvas assignment pages to SIMnet (McGraw Hill) external tool assignments. Documents the tool_launch redirect pattern, LTI chain timing (tool_launch → LTI authorize → envcheck/SSO → assignment), detection signals (iframe.tool_launch class, innerHTML McGraw Hill text), SIMnet vs Connect disambiguation (redirect destination), envcheck page handling (redirects after load event, requires post-load wait loop), and the resulting canvas_simnet_go() helper." warnings: "`canvas_simnet_go()` uses `goto_url()` in the current tab — it replaces whatever page you're on. Do not call if you need to preserve page state.\nThe `ok` check depends on `simnetonline.com/sp/assignments` or `/sp/simbooks` in the final URL. If SIMnet introduces new URL patterns, update the ok detection in `canvas_simnet_go()`.\nThe redirect wait loop is timing-sensitive. Changes to sleep durations must be tested against both simbooks (Access assignments — envcheck path) and projects (Excel assignments — direct SSO path)." --- ## Failed Approaches Read children for 6 discarded probes — each documents a distinct approach that didn't work for detecting SIMnet from Canvas: - `iframe.contentDocument` via `js()`: Chrome SOP blocks cross-origin access - CDP `Page.getFrameTree`: Cross-origin iframes not enumerated - `DOMSnapshot.captureSnapshot`: Router URL detection timing-dependent, unreliable - `innerHTML` router URL detection: Router URLs injected dynamically after page parse - CDP `Target.getTargets`: Cross-origin iframes don't appear as separate browser targets - Three-function API (`detect` + `get_url` + `navigate`): Collapsed into single helper ## Redirect Chain ## Detection Signals - `iframe.tool_launch` class: present on any Canvas assignment with an LTI tool (both SIMnet and Connect) - `innerHTML` contains "McGraw Hill": confirms McGraw Hill tool but does not distinguish SIMnet from Connect - `innerHTML` does NOT contain router URLs (`simnet.router`, `connect.router`): dynamically injected, absent from static HTML - `DOMSnapshot.captureSnapshot` router URLs: present on some pages, absent on others — timing-dependent - Reliable signal: navigate to tool_launch and check the redirect destination. `simnetonline.com` → SIMnet. `connect.router...` → Connect. ## Result: canvas_simnet_go() Single helper function in agent_helpers.py. One call, works or doesn't. No multi-step detection → navigation workflow. Returns `{ok, url, type}`.