       result
 
     @action_log_style = @komp =>
-      minimize: => @success
+      minimize: => @status == "success"
 
     @duration = @komp () =>
       Circle.time.pretty_duration_short(@run_time_millis())
 
 
 
+
 #TODO: next step is to add the vcs_url, which is why I was looking at the knockout.model and knockout.mapping plugin
 class Build extends Base
   constructor: (json) ->
     # make the actionlogs observable
-    json.action_logs = ko.observableArray( (new ActionLog(j) for j in json.action_logs) )
+    json.action_logs = (new ActionLog(j) for j in json.action_logs) if json.action_logs
     super json,
       committer_email: null,
       committer_name: null,
       body: null,
       subject: null
+      user: null
 
     @url = @komp =>
       "#{@project_path()}/#{@build_num()}"

    ko.computed args...


class ActionLog extends Base
  constructor: (json) ->
    super json,
      timedout: null
      exit_code: 0


  constructor: (json, defaults = {}) ->
    for k,v of defaults
      @[k] = @observable(v)

    for k,v of json
      @[k] = @observable(v)

  observable: (obj) ->
    if $.isArray obj
      ko.observableArray obj
    else
      ko.observable obj

  project_name: =>
    @vcs_url().substring(19)
