Skip to content
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

Enhance note status #487

Merged
merged 13 commits into from
Dec 10, 2024
Merged

Enhance note status #487

merged 13 commits into from
Dec 10, 2024

Conversation

ticruz38
Copy link
Collaborator

@ticruz38 ticruz38 commented Nov 22, 2024

Related to #371

  • Adding 3 tabs to the Publishes view
  • Connections have 6 stats boxes that display the connection quality (connected, logged out, failed etc) clicking one of the stat box filter out the connections that fit in that category.
  • Each connection or Relay has a badge if some event where posted via them (success is also used)
  • Notices tab will list all event posted via this relay and the status attached

Notices are kind of unclear what should be displayed, I have the event, the status of the request and the relay url, not sure how to display this.

This is a draft, just look at the screenshot and give me some general feedback

Stats box are likely too big, you can see a timeout attached to some relay
Screenshot 2024-11-22 at 16 00 30

Here the relay display how many successful events where posted to it
Screenshot 2024-11-22 at 16 37 31

Screenshot 2024-11-22 at 16 01 31 Screenshot 2024-11-22 at 16 38 48

@staab staab changed the base branch from master to dev November 22, 2024 17:55
@staab
Copy link
Collaborator

staab commented Nov 22, 2024

Nice, a few comments:

  • Instead of icons, use text. In this case, the icon is the main piece of information so it shouldn't be hidden behind something the user has to guess at or hover over. Something similar to the current status dot would be good — maybe in the top right, across from the relay name, show a dot + a status name with a tooltip that explains what the status means.
  • I agree the tiles are too big. Maybe use SelectButton multiple=true instead to control which connections are visible
  • On notices, I was thinking less about showing event publishes than NOTICE or OK=false messages from a given relay. If it's an ok related to an event, you can show some event details, but the main thing to surface is the message that goes along with the notice or ok.

@ticruz38 ticruz38 force-pushed the enhance/note-status branch from cc74996 to d06bef4 Compare November 25, 2024 11:14
@ticruz38
Copy link
Collaborator Author

ticruz38 commented Nov 25, 2024

Show connection status, there is no popover on the status as the name is quite descriptive already.
Screenshot 2024-11-25 at 14 33 57

With a status selected using SelectButton
Screenshot 2024-11-25 at 14 47 42

The notice looks like coloured logs in a terminal, since Notice are de-facto a nerdish info, it make sense to have this more technical oriented display.
Screenshot 2024-11-25 at 14 24 49

I rarely get any message from the endpoint along with the status, I have here the default message being hardcoded as "Published", I can use something more technical such as 200 OK
When clicking on the line it pops a modal with the event.

@staab
Copy link
Collaborator

staab commented Nov 25, 2024

Cool, I like all of this. Maybe left-align the select buttons though. Otherwise, let me know when it's ready for review and I'll take a closer look.

@ticruz38
Copy link
Collaborator Author

It should be fine to review now

Have created 2 new components, in the view folder, PublishesNotices and PublishesConnections, the plan was to have them link to the router but it proved more challenging than expected with the tabs. So these 2 views are just 2 child components for Publishes.

I can move them to another folder if it makes more sense

@ticruz38 ticruz38 force-pushed the enhance/note-status branch from c04ad6e to 7e07291 Compare November 26, 2024 14:16
src/app/views/PublishesConnections.svelte Outdated Show resolved Hide resolved
src/app/views/PublishesConnections.svelte Outdated Show resolved Hide resolved
src/app/views/PublishesConnections.svelte Outdated Show resolved Hide resolved
src/app/views/PublishesConnections.svelte Show resolved Hide resolved
src/app/views/PublishesConnections.svelte Outdated Show resolved Hide resolved
src/app/views/PublishesNotices.svelte Outdated Show resolved Hide resolved
src/app/views/PublishesNotices.svelte Outdated Show resolved Hide resolved
@ticruz38 ticruz38 added this to the 0.5.0 milestone Nov 28, 2024
@ticruz38 ticruz38 force-pushed the enhance/note-status branch from 9f27fb7 to 5ccb27c Compare November 28, 2024 11:09
@ticruz38
Copy link
Collaborator Author

ticruz38 commented Dec 3, 2024

  • Tracking all Notice events when bootstrapping the app.
  • Connection barely triggers any ConnectionEvent.Notice events, so I catch all verbs except EVENT. This includes Negentropy messages, EOSE, CLOSE, OK, etc.
  • The notice console is more compact now and holds a lot more information.
  • As for the colors, EOSE uses a neutral color—it is usually synonymous with success, but it can also indicate failure. OK is in green, despite sometimes being synonymous with an auth error.
Screenshot 2024-12-03 at 15 25 39 Screenshot 2024-12-03 at 15 24 42 Screenshot 2024-12-03 at 15 23 11

Copy link
Collaborator

@staab staab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, a few things:

  • Enhance note status #487 (comment) still needs to be resolved
  • On the notices page, let's replace the relay selector with a generic "search" box. This should match against relay url, verb (ok/notice), and message.
  • The animation on the notices page is janky, use in rather than transition.
  • While I like the granularity on the notices page, I agree with your point that storing all this is going to be pretty heavy, for not very much benefit. Let's slim it down to OK and NOTICE.
  • Let's factor the thunks page out into its own component as well.

src/app/views/PublishesNotices.svelte Outdated Show resolved Hide resolved
src/app/views/PublishesNotices.svelte Outdated Show resolved Hide resolved
src/engine/model.ts Outdated Show resolved Hide resolved
src/engine/state.ts Outdated Show resolved Hide resolved
@ticruz38 ticruz38 force-pushed the enhance/note-status branch from 220c623 to 6abf5ea Compare December 4, 2024 16:10
@ticruz38
Copy link
Collaborator Author

ticruz38 commented Dec 4, 2024

  • Lots of refactoring.
  • The notice page now shows all notifications; you can filter them afterwards by relay URL, request verb, or connection message.
  • When clicking on a connection, it navigates to the notice tab with the search field pre-filled with the clicked relay URL

Copy link
Collaborator

@staab staab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's actually add CLOSED back in (my mistake).

src/app/views/Publishes.svelte Outdated Show resolved Hide resolved
src/app/views/PublishesNotices.svelte Outdated Show resolved Hide resolved
src/engine/state.ts Outdated Show resolved Hide resolved
@ticruz38 ticruz38 force-pushed the enhance/note-status branch from cc06337 to 10e0fc9 Compare December 9, 2024 11:28
@ticruz38
Copy link
Collaborator Author

ticruz38 commented Dec 9, 2024

  • added a new env variable, LOG_VERBS, that will be visible in the notice console

@staab
Copy link
Collaborator

staab commented Dec 9, 2024

What's the use case for putting verbs in .env? I think we can just include them inline.

One other thing, threshold for the search should probably be higher:

Screenshot 2024-12-09 at 10 41 02 AM

@ticruz38
Copy link
Collaborator Author

ticruz38 commented Dec 10, 2024

What's the use case for putting verbs in .env? I think we can just include them inline.

To make them configurable essentially, I did not know exactly which verbs should be whitelisted

@ticruz38 ticruz38 force-pushed the enhance/note-status branch from 14e5501 to dfceba3 Compare December 10, 2024 10:46
@staab staab marked this pull request as ready for review December 10, 2024 16:14
@staab staab merged commit 651bfee into coracle-social:dev Dec 10, 2024
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants