Problem
In-document components (e.g. tpen-transcription-block) can refresh the simple-transcription view after mutating project data because they share the TPEN.eventDispatcher singleton with simple-transcription — they dispatch on the bus and simple-transcription re-renders.
Iframed splitscreen tools cannot reach that bus. The only channel out is postMessage, and simple-transcription/index.js#handleToolMessages (line 942) currently only forwards REQUEST_TPEN_ID_TOKEN and routes line-navigation message types — there's no handler that lets a tool ask the parent to invalidate cached page data and repaint.
This blocks the JSON-paste fallback flow from refreshing the parent transcription view after a successful page PUT, and would block any future iframed tool that mutates project state.
Suggestion
Pass the parent current interface in via TPEN_CONTEXT (such as /transcribe). That will give us the ability to know the parent interface, and the child can attempt parent navigation or refresh from there.
or
Pass a message back out from the iframed child that tells the parent to repaint.
When a copy-and-paste fallback succeeds we want to see the data in the interface. There is a cheap hack to force the parent interface to reload right now.
Problem
In-document components (e.g.
tpen-transcription-block) can refresh the simple-transcription view after mutating project data because they share theTPEN.eventDispatchersingleton withsimple-transcription— they dispatch on the bus andsimple-transcriptionre-renders.Iframed splitscreen tools cannot reach that bus. The only channel out is
postMessage, andsimple-transcription/index.js#handleToolMessages(line 942) currently only forwardsREQUEST_TPEN_ID_TOKENand routes line-navigation message types — there's no handler that lets a tool ask the parent to invalidate cached page data and repaint.This blocks the JSON-paste fallback flow from refreshing the parent transcription view after a successful page PUT, and would block any future iframed tool that mutates project state.
Suggestion
Pass the parent current interface in via TPEN_CONTEXT (such as /transcribe). That will give us the ability to know the parent interface, and the child can attempt parent navigation or refresh from there.
or
Pass a message back out from the iframed child that tells the parent to repaint.
When a copy-and-paste fallback succeeds we want to see the data in the interface. There is a cheap hack to force the parent interface to reload right now.