-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Agent connection status icons #1482
Conversation
25cee9f
to
aa71c8e
Compare
Cool idea! I find the arrows a bit confusing. I wonder how to indicate coming in vs. going out more clearly. I kind of want an arrow going into a box vs. coming out of it, maybe? |
private | ||
|
||
def links_counter_cache(agents) | ||
@counter_cache ||= {}.tap do |cache| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable @counter_cache
isn't conditioned on agents
. It it possible for this method to be called more than once with a different set of agents, causing cache pollution?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cache would not be polluted because it's only set once per request, but calling it with a different agents
array it could incorrectly return nil
if the agents was not present in the first array. I added agents.__id__
as an additional cache key.
Yeah, it wasn't easy to find icons that match well. Do you mean like the icon that is currently used for the commanding Agents? |
Yes, the commanding one flipped left / right seems to make sense for the agents that create and receive events. I'm not sure what to then use for commanding ;) |
Is this fairly performant? We could consider not showing control links if it sped it up. |
I think I don't follow, do you think about two icons for agents that send and receive or a combination of Performance wise it should be hard to notice, before it was fixed we had a n+1 for the agent event count on every agent table page and nobody complained about it :). What was n+1 before is would now be three extra query for every page. |
Yes, I think |
Yea, it feels a bit cluttered. When the emit and receive are combined into the pair of arrows, does it look better to you? |
I agree that it's a bit hard to tell the difference between emitting and receiving events. Maybe we need help from a graphic designer? |
I do think we could try rolling it out, though, and see what people think. |
|
||
def links_counter_cache(agents) | ||
@counter_cache ||= {} | ||
@counter_cache[agents.__id__] ||= {}.tap do |cache| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Random question: is __id__
the same as object_id
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I know it is.
I could get used to this design. Emit vs. receive aren't intuitive for me (left vs right), but I'm sure my brain would get used to it. Or maybe a graphic designer will show up. |
098f45d
to
02d6421
Compare
02d6421
to
506a708
Compare
Cool, thanks for the feedback and reviews! It's funny how brains work differently when it comes to intuition :) |
Nice :) |
This adds icons the the Agent tables which give an indication if and how the agent is connected in the Agent network.
Since I was able to eliminate a n+1 query(superseded by #1486) the change should not impact the performance, as long as more then 3 Agents are shown it should even be faster then before.Thanks to kreuzwerker.de who are paying me to work on this in the context of the research project 'Digitale Kuratierungstechnologien' of which they are a part of.