Technical Questions/suggestions

Fixed the script to accomotade for the new menu:

// ==UserScript==
// @name         Temporary fix for menu duplication
// @namespace    http://tampermonkey.net/
// @version      0.2.2
// @description  Fix
// @author       Krzysztof Kruk
// @match        https://ngl.flywire.ai/*
// @grant        none
// ==/UserScript==
/* globals viewer */


(function() {
    'use strict';

    setInterval(() => {
        const existing = []
        const menus = document.getElementsByClassName('neuroglancer-layer-group-viewer-context-menu')
        const layer = viewer.saver.pull().state.layers[1]
        const segmentsLength = (layer.segments ? layer.segments.length : 0) + (layer.hiddenSegments ? layer.hiddenSegments.length : 0)
        if (menus.length > segmentsLength) {
            for (let i = menus.length - 1; i > 0; i--) {
                const id = menus[i].getElementsByTagName('a')[0].href.split('input_field=')[1].split('=')[0]
                if (existing.includes(id)) {
                    menus[i].remove()
                }
                else {
                    existing.push(id)
                }
            }
        }
    }, 10000)
})();
2 Likes

This is probably a task for HQ but have you considered if it would be useful to also add label (cell type) if known on the connected cells, shown in the connectivity app. This might help find out what kind of cell it is based on partners with fewer clicks.
And could probably also help finding errors (type x is usually not connected to type z so have to be a merger or wrongly labeled cell)

3 Likes

Agree, it would be very useful. I’ve also thought about it (that HQ should add it). It might be doable via a script, but only when the lightbulbs problem is fixed. Currently it allows only up to about 60 cells to display their status. Because the fix could change the API, I’ll wait with any scripting until it’s done.

is there any way you could make a option on what too show in the action menu. For instance now i am only selecting on the hidden/visible option and would like to tempory hide the other 4 options to make the menu smaller. when working on other types of cell there might be need to use the other selections and perhaps hide the hidden/visible option

1 Like

I’ll look into it.

1 Like

Added the possibility. More info at [addon] Batch Processor - #23 by Krzysztof_Kruk.

Every once in a while (I have not been able to pin down any specific times or days), I get errors that Identify/Mark Complete are not available. I get this error both with and without KK’s scripts enabled. Pictured below.

The bizarre thing is that when this happens, I am still able to access all the prod.flywire-daf links and use them to manually submit completion or identification. Just not through ngl itself.

I’ve seen this ‘clear up’ in a couple of hours (and it does not affect KK’s mass identifier) but it can be a hiccup when I am working on multiple cell types at once (or even just when I want to ID one specific cell out of a batch different than the rest).

(Note this is not at all similar to the “nightly” downtime of the flywire-daf system which seems to happen sometime between 1-3am Eastern - then even the manual DAF links will result in errors and will not load.)

image image

1 Like

Hi AzureJay,

Thanks for reporting! I’ll pass this along to the devs. You’re not alone as in lab we also have been experiencing the same downtime with the “lightbulb system” (aka the ability to submit labels/complete cells via that menu). I haven’t noticed a particular pattern either… hopefully, with each fix we get closer to stabilizing the issue. Please feel free to also send us reports about the downtime to flywire@eyewire.org

Best,
M.

1 Like