<commit_before>import './styles.css'
import Inferno from 'inferno' // eslint-disable-line
import {connect} from 'cerebral/inferno'
import {state, signal} from 'cerebral/tags'
import classnames from 'classnames'
import {nameToColors} from '../../../common/utils'
import Mutation from '../Signals/Signal/Action/Mutation'
import connector from 'connector'

export default connect({
  port: state`port`,
  mutations: state`debugger.mutations`,
  currentRememberedMutationIndex: state`debugger.currentRememberedMutationIndex`,
  searchValue: state`debugger.searchValue`,
  executingSignalsCount: state`debugger.executingSignalsCount`,
  mutationDoubleClicked: signal`debugger.mutationDoubleClicked`,
  mutationClicked: signal`debugger.mutationClicked`,
  signalClicked: signal`debugger.signalClicked`
},
  function Mutations ({
    port,
    mutations,
    currentRememberedMutationIndex,
    searchValue,
    executingSignalsCount,
    mutationDoubleClicked,
    mutationClicked,
    signalClicked
  }) {
    return (
      <div className='mutations'>
        <div className='list'>
          {mutations.map((mutation, index) => {
            const namePath = mutation.signalName.split('.')
            const name = namePath.pop()
            const colors = nameToColors(mutation.signalName, name)
            const hex = colors.backgroundColor
            const signalStyle = {
              backgroundColor: hex
            }
            const isSearchHit = searchValue && mutation.data.args[0].join('.').indexOf(searchValue) >= 0

            return (
              <li
                className={classnames('list-item', {
                  'faded': searchValue && !isSearchHit
                })}
                key={index}
              >
                <div className='list-indicator' style={signalStyle} />
                <div
                  className='signal-name'
                  onClick={() => signalClicked({executionId: mutation.executionId})}
                >
                  {mutation.signalName}
                </div>
                <Mutation mutation={mutation.data} onMutationClick={(path) => mutationClicked({path})} />
                {currentRememberedMutationIndex === index ? (
                  <button disabled className='timetravel-button active'>now</button>
                ) : (
                  <button disabled={executingSignalsCount} onClick={() => {
                    mutationDoubleClicked({index})
                    connector.sendEvent(port, 'remember', index)
                  }} className='timetravel-button'>travel</button>
                )}
              </li>
            )
          })}
        </div>
      </div>
    )
  }
)
<commit_msg>fix pathClicked for Mutation view as well<commit_after>import './styles.css'
import Inferno from 'inferno' // eslint-disable-line
import {connect} from 'cerebral/inferno'
import {state, signal} from 'cerebral/tags'
import classnames from 'classnames'
import {nameToColors} from '../../../common/utils'
import Mutation from '../Signals/Signal/Action/Mutation'
import connector from 'connector'

export default connect({
  port: state`port`,
  mutations: state`debugger.mutations`,
  currentRememberedMutationIndex: state`debugger.currentRememberedMutationIndex`,
  searchValue: state`debugger.searchValue`,
  executingSignalsCount: state`debugger.executingSignalsCount`,
  mutationDoubleClicked: signal`debugger.mutationDoubleClicked`,
  mutationClicked: signal`debugger.mutationClicked`,
  signalClicked: signal`debugger.signalClicked`,
  pathClicked: signal`debugger.pathClicked`
},
  function Mutations ({
    port,
    mutations,
    currentRememberedMutationIndex,
    searchValue,
    executingSignalsCount,
    mutationDoubleClicked,
    mutationClicked,
    signalClicked,
    pathClicked
  }) {
    return (
      <div className='mutations'>
        <div className='list'>
          {mutations.map((mutation, index) => {
            const namePath = mutation.signalName.split('.')
            const name = namePath.pop()
            const colors = nameToColors(mutation.signalName, name)
            const hex = colors.backgroundColor
            const signalStyle = {
              backgroundColor: hex
            }
            const isSearchHit = searchValue && mutation.data.args[0].join('.').indexOf(searchValue) >= 0

            return (
              <li
                className={classnames('list-item', {
                  'faded': searchValue && !isSearchHit
                })}
                key={index}
              >
                <div className='list-indicator' style={signalStyle} />
                <div
                  className='signal-name'
                  onClick={() => signalClicked({executionId: mutation.executionId})}
                >
                  {mutation.signalName}
                </div>
                <Mutation mutation={mutation.data} onMutationClick={(path) => mutationClicked({path})} pathClicked={pathClicked} />
                {currentRememberedMutationIndex === index ? (
                  <button disabled className='timetravel-button active'>now</button>
                ) : (
                  <button disabled={executingSignalsCount} onClick={() => {
                    mutationDoubleClicked({index})
                    connector.sendEvent(port, 'remember', index)
                  }} className='timetravel-button'>travel</button>
                )}
              </li>
            )
          })}
        </div>
      </div>
    )
  }
)

{'fraction_non_alphanumeric': 0.11428052325581395, 'fraction_numerical': 0.0007267441860465116, 'mean_word_length': 2.2043073341094295, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 41, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1448294', 'n_tokens_mistral': 1509, 'n_tokens_neox': 1442, 'n_words': 266}