<commit_before>class App.Controllers.Notifications
  # Cache for recently loaded notification views
  cache: new Cache(10)

  constructor: (@vent) ->
    _.extend @, Backbone.Events
    @listenTo @vent, 'notification:selected', @show
    # @listenTo @collection, 'unselected', @hide

  show: (notification) =>
    return unless notification

    view = @cache.fetch notification.cid,
      -> new App.Views.NotificationDetailsView(model: notification)
    # FIXME: replace with app layout
    $('#details').html(view.el)
    view.show()

  hide: (model) ->
    @cache.get(model.cid)?.hide()<commit_msg>update controller handling<commit_after>class App.Controllers.Notifications
  # Cache for recently loaded notification views
  cache: new Cache(10)

  constructor: (@vent) ->
    _.extend @, Backbone.Events
    @listenTo @vent, 'notification:selected', @show
    # FIXME: trigger this somewhere
    @listenTo @vent, 'notification:unselected', @hide

  show: (notification) =>
    return unless notification

    view = @cache.fetch notification.cid,
      -> new App.Views.NotificationDetailsView(model: notification)
    # FIXME: replace with app layout
    $('#details').html(view.el)
    view.show()

  hide: (model) ->
    @cache.get(model.cid)?.hide()
{'fraction_non_alphanumeric': 0.13036565977742448, 'fraction_numerical': 0.003179650238473768, 'mean_word_length': 3.8237547892720305, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '2124489', 'n_tokens_mistral': 364, 'n_tokens_neox': 364, 'n_words': 93}