<commit_before>class TeamworkAppController extends AppController

  KD.registerAppClass this,
    name            : "Teamwork"
    route           : "/:name?/Teamwork"
    behavior        : "application"
    enforceLogin    : yes

  constructor: (options = {}, data) ->

    options.view    = new TeamworkAppView

    options.appInfo =
      type          : "application"
      name          : "Teamwork"

    super options, data


  handleQuery: (query) ->

    search = location.search
    if /guest-/.test search
      search = ""

    path = location.pathname + search
    mainController = KD.getSingleton("mainController")
    mainController.once "accountChanged.to.loggedIn", =>
      location.replace path

    view = @getView()
    view.ready => view.handleQuery query<commit_msg>Teamwork: resize trigger on app is shown<commit_after>class TeamworkAppController extends AppController

  KD.registerAppClass this,
    name            : "Teamwork"
    route           : "/:name?/Teamwork"
    behavior        : "application"
    enforceLogin    : yes

  constructor: (options = {}, data) ->

    options.view    = new TeamworkAppView

    options.appInfo =
      type          : "application"
      name          : "Teamwork"

    super options, data

    KD.singletons.appManager.on 'AppIsBeingShown', (app)=>
      if app.getId() is @getId()
        KD.utils.defer -> $(window).trigger 'resize'


  handleQuery: (query) ->

    search = location.search
    if /guest-/.test search
      search = ""

    path = location.pathname + search
    mainController = KD.getSingleton("mainController")
    mainController.once "accountChanged.to.loggedIn", =>
      location.replace path

    view = @getView()
    view.ready => view.handleQuery query
{'fraction_non_alphanumeric': 0.10577472841623785, 'fraction_numerical': 0.0, 'mean_word_length': 2.3589251439539347, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '3294236', 'n_tokens_mistral': 511, 'n_tokens_neox': 484, 'n_words': 115}