Skip to content

Conversation

@Simon-Laux
Copy link
Contributor

closes #7591

image image

and name the section Relay Capacity until we come up with a better name.

and use email parse method to extract domain from email
@Simon-Laux Simon-Laux changed the title feat: Connectivity View: Quota for all Transports feat: connectivity view: quota for all transports Dec 19, 2025
src/quota.rs Outdated
assert!(t.quota_needs_update(TIMEOUT).await);
assert!(t.quota_needs_update(0, TIMEOUT).await);

// add entry and quota, check that it exists
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are these some todo comments?

Can be just removed probably.

Copy link
Contributor Author

@Simon-Laux Simon-Laux Dec 20, 2025

Choose a reason for hiding this comment

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

ah right forgot to add a test here, will do that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There should be a test here that tests that the quota for a transport is removed, when that transport is deleted.

But I haven't found a simple way to add transports in rust tests at first glance and it is not too important, so I'll just remove the comments.

let storage_on_domain =
escaper::encode_minimal(&stock_str::storage_on_domain(self, domain).await);
ret += &format!("<h3>{storage_on_domain}</h3><ul>");
// TODO: stock string - when we decided on a good term,
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be decided before we merge, otherwise this will be just a merged TODO.

Ideally something similar to existing applications, but I did not manage to find anything similar quickly.

Maybe something like "Inbox size", "Inbox space", "Inbox quota", "incoming message queue size", "message queue size" etc. I think "Inbox" already makes it clear that this is not a message archive, but something temporary, this is what we want to avoid someone thinking that relays store messages.

cc @r10s

Copy link
Collaborator

Choose a reason for hiding this comment

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

"Relay capacity" also looks good because it's "relay" and not "server", i.e. smth that retransfers messages, but doesn't store them indefinitely. But i'd lowercase "capacity", this text is just a description and not a UI control text

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But i'd lowercase "capacity", this text is just a description and not a UI control text

is is a title/heading and for consistency with other titles all words have to be capitalized:

image

Copy link
Contributor

@r10s r10s Dec 20, 2025

Choose a reason for hiding this comment

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

"Capacity" is similar to "Storage", and does not imply that it is temporary gets smaller and bigger as needed.

but there seems to be a term for exactly that: "Buffer" - it was discarded at #7580 (comment) as not being "good enough" - but it seems to describe better what it does, see eg. https://en.wikipedia.org/wiki/Data_buffer or in german https://de.wikipedia.org/wiki/Puffer_(Informatik)

if we agree that it is technically a "buffer", i would stay with that term (speaking of "chatmail" usage only here where things are deleted soon, we should not try to find a term that fits classic email usage as well)

"buffer" is also not that unknown - quite some user probably know that by various other techniques (netflix streaming buffers :) - and if ppl do not understand the term, they would probably also not understand "relay capacity" - but it would also not be too bad as the layout is also self-speaking

Copy link
Contributor Author

@Simon-Laux Simon-Laux Dec 20, 2025

Choose a reason for hiding this comment

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

technically it is a quota, an allowance of how much resources you can use at a given time or in a given time-frame. I'm still not convinced of the term "Buffer", at-least not without a small explanation sentence bellow the heading.

But In the end I don't really care. would you want "Relay Buffer" or just "Buffer"?

Copy link
Contributor

Choose a reason for hiding this comment

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

well, quota is very much related to storage and capacity again, not implying things are temporarily. esp. when having more than one relay, ppl might thing, space sums up (they may still think that with "buffer" :)

i would just for "Buffer" - we're not introducing the term "Relay" much otherwise.

however, tbh, i would also not die on that hill - if "Buffer" does not work out or others already now find it weird as well, we can go for smth else. but at a first glance, i think it is a good start

Copy link
Collaborator

@Hocuri Hocuri Dec 20, 2025

Choose a reason for hiding this comment

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

What about "Message Buffer Capacity"? ("Kapazität des Zwischenspeichers" in German)

  • All of connectivity view is about relays, no need to mention "relay"
  • It's about messages
  • It's about the capacity for temporarily holding these messages

Copy link
Contributor

@r10s r10s Dec 20, 2025

Choose a reason for hiding this comment

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

bit long maybe, esp. for translations - german translation seems inaccurate, would be "Kapazität des Nachrichtenzwischenspeichers" or "Nachrichtenzwischenspeicherkapazität" (yeah, we're good in long words :)

so maybe shorten to "Message Buffers"? plural, as there are several buffers. that it is about "capacity and usage in megabytes" is clear by what follows (it is not only mainly capacity, thinking it over)

could look like the following (also flattened a bit):

relays-connectivity

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if we change the design, how would we show errors in a way that looks decent?

Copy link
Contributor

Choose a reason for hiding this comment

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

in a similar way, so without headlines and additional indent. if in doubt, prefix them alway with host - same for other quota values - but both is rare and not the normal case

but as said, if easier, that can also be part of a subsequent PR, the layout in that area is no blocker for this PR

let storage_on_domain =
escaper::encode_minimal(&stock_str::storage_on_domain(self, domain).await);
ret += &format!("<h3>{storage_on_domain}</h3><ul>");
// TODO: stock string - when we decided on a good term,
Copy link
Collaborator

Choose a reason for hiding this comment

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

"Relay capacity" also looks good because it's "relay" and not "server", i.e. smth that retransfers messages, but doesn't store them indefinitely. But i'd lowercase "capacity", this text is just a description and not a UI control text

@r10s
Copy link
Contributor

r10s commented Dec 20, 2025

ftr, i think, this eats up to much vertical space, degrading the other parts. however, this should not be a blocker and i'd also see that a bit in practise before iterating over that.

all in all already lgtm, thanks a lot for taking care! ❤️

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.

Display quota for all transports in connectivity view

6 participants