fix pattern and text variables in the trace.

they have to be "added" manually so the visualization code treats it as
if it's defined in the input code.
fix left/right handling with long text in input fields.