<commit_before>class window.ClientController
  constructor: (@annotatedSiteEnvoy) ->
  showFact: (fact_id) ->
    fact = new Fact id: fact_id

    fact.on 'destroy', => @annotatedSiteEnvoy 'closeModal_deleteFactlink', fact_id

    fact.fetch
      success: =>
        newClientModal = new DiscussionModalContainer
        FactlinkApp.discussionModalRegion.show newClientModal
        view = new DiscussionView model: fact
        view.on 'render', => @annotatedSiteEnvoy 'openModalOverlay'
        newClientModal.mainRegion.show view

  showNewFact: (params={}) =>
    fact = new Fact
      displaystring: params.displaystring
      url: params.url
      fact_title: params.fact_title

    if Factlink.Global.signed_in
      fact.save {},
        success: =>
          @annotatedSiteEnvoy 'highlightNewFactlink', params.fact, fact.id
          Backbone.history.navigate "/client/facts/#{fact.id}", trigger: true
    else
      view = new NewFactLoginView model: fact
      view.on 'render', => @annotatedSiteEnvoy 'openModalOverlay'

      clientModal = new DiscussionModalContainer
      FactlinkApp.discussionModalRegion.show clientModal
      clientModal.mainRegion.show view<commit_msg>Fixed another fact => displaystring<commit_after>class window.ClientController
  constructor: (@annotatedSiteEnvoy) ->
  showFact: (fact_id) ->
    fact = new Fact id: fact_id

    fact.on 'destroy', => @annotatedSiteEnvoy 'closeModal_deleteFactlink', fact_id

    fact.fetch
      success: =>
        newClientModal = new DiscussionModalContainer
        FactlinkApp.discussionModalRegion.show newClientModal
        view = new DiscussionView model: fact
        view.on 'render', => @annotatedSiteEnvoy 'openModalOverlay'
        newClientModal.mainRegion.show view

  showNewFact: (params={}) =>
    fact = new Fact
      displaystring: params.displaystring
      url: params.url
      fact_title: params.fact_title

    if Factlink.Global.signed_in
      fact.save {},
        success: =>
          @annotatedSiteEnvoy 'highlightNewFactlink', params.displaystring, fact.id
          Backbone.history.navigate "/client/facts/#{fact.id}", trigger: true
    else
      view = new NewFactLoginView model: fact
      view.on 'render', => @annotatedSiteEnvoy 'openModalOverlay'

      clientModal = new DiscussionModalContainer
      FactlinkApp.discussionModalRegion.show clientModal
      clientModal.mainRegion.show view
{'fraction_non_alphanumeric': 0.08958938199917046, 'fraction_numerical': 0.0, 'mean_word_length': 3.2690265486725663, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 20, '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': '5996279', 'n_tokens_mistral': 689, 'n_tokens_neox': 658, 'n_words': 150}