fileability/chocolat-public — Issue #601: Actions → Build enhancements.
Author: amcgregor
Created: 2011-11-03 05:52:57+00:00
State: open

Interactivity
====

With the file list context item of "Execute in Terminal", the Actions → Build "Run" command should be split into two:

* Run
* Run in Terminal

With customizable key bindings it is then up to the user which to bind to Command+R as the default. Additionally, there should be some way to provide initial arguments to the script, possibly using an additional modifier key such as Option. REPL and Debug are, understandably, always interactive. Build and Check, however, are almost universally non-interactive.

Non-interactive command execution should capture the output of the script and present it to the user as output is generated, likely using a WebView. In this way output to STDERR can be coloured differently from STDOUT and the current theme can be applied.

Preserve Output
====

An extra bonus feature would be the capture and *storage* of the output of command execution (both interactive and non-interactive) within the project. [This mockup](http://cl.ly/091S1P2Q2y362S0D2u1s/o) illustrates a separation between the current Actions → Build items as collapsable sections with some additional features:

* All items are timestamped. I like relative times (e.g. "just now", "5 minutes ago"), but not everybody does.
* All items can determine success or failure from the executed script's return value. (`$?` in BASH.)
* Tests (Actions → Build → Check), with appropriate truffle support, can generate high quality HTML output potentially with hyperlinks and attractive CSS styling of the generated reports. The title of the generated HTML page can be presented as the label. (These should allow error, warning, and success states.)
* As builds are usually binary operations (either successful or not), the label can be used to present the duration of the build.
* The WebViews presenting the results can be split viewed as per normal, allowing for review of code against test output or failed run logs. [1]
* Logs can be deleted normally.
* Non-interactive applications can be left to run but immediately display an item in one of these lists, icon badged appropriately and optionally with a timestamp value of "running". Bonus polish points if the icon badge for the running state is animated. (Or simply replace the icon with a small circular indeterminate progress indicator.)

Notes
====

1. This, for one, will save me a *lot* of time switching back and forth between a terminal unit test report and Chocolat.