Skip to content
Ilya Sher edited this page Jan 13, 2026 · 13 revisions

Recording Design - WIP

TODO: link here from other pages.

Definitions

Object

Object, in the context of this page, is a user interface element that supports any kind of interaction. Imprecisely saying, Objects appear in outputs of programs.

This definition is intentionally shallow as Objects are not the focus of this page.

Interaction Record

More precisely, "Structured Interaction Record" is a structured data representation of single user interaction event with the shell. Examples:

  • Entering a command
  • Mouse click on an Object
  • Hitting enter to interact with selected Object
  • Opening context menu and selecting a command from the menu

Recording

Recording is a group of Interaction Records. Recording, in its purpose, is similar to a script: it provides reproducibility. Recordings are made automatically as user interacts with the shell and can be edited later, including:

  • addition of assertions
  • addition of comments
  • parametrization
  • editing of Object selection criteria (when guessed wrong), within limits

Challenges

WIP

  • To be usable for Replay, Interaction Record must capture the semantics of the interaction, the intent. For example, if there is a list of EC2 instances, and the user decides to stop one of the instances in the list. The user is not interacting with instance with id i-123456. The use might be interacting with instance having Name tag dev, or the most recently launched of the machines having tag Role with value staging, or any other unforeseen criteria. Unfortunately, this semantics is not directly available - we don't know why the user choose to interact with one Object or another.
  • While we want to capture the precise semantics of the interaction, it is also inappropriate to stop and ask the user. The shell can not be getting in the way of performing tasks. This is especially true when the user does one off (or what seems to be one off at the moment) task and doesn't care about recording and reproducibility.

Requirements

WIP

  • Interaction Record must be useful when the context changes: whether it's another AWS account, region, instance ID, etc. Replay should work in the widest possible change of context.
  • TODO: Which command? Last? Last of type? Variables, parameters.
  • TODO: Step by step replay.
  • TODO: Parametrization of Recording.

Design

WIP

  • The criteria by which the user has selected particular Object during interaction are guessed when creating a new Interaction Record.
    • The assumption here is that few relatively simple heuristics would "guess" the criteria correctly in the majority of cases. Example: among table rows, a unique value in a particular column is a good candidate (excluding random unique ID column).
    • Interaction Record is modifiable after the fact. The modification is limited though to sets of criteria that would produce the same result. TODO: elaborate.
  • TODO: Guessing Command/output selection criteria.
  • TODO: Assertions, including automatic (ex: single match), stopping/debugging on failed assertion
  • TODO: Multi-selection
  • TODO: Why it's OK to ask the user to interact with fields when selecting an Object
  • TODO: Step by step replay.
  • TODO: Parametrization

Thinking over Time

WIP

TODO: explain why changed from textual representation of interaction (as code) to structured data.

Clone this wiki locally