simon-git: mastodonochrome (main): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Sun Feb 11 15:26:48 GMT 2024


TL;DR:
  f566ce7 TODO updates.
  d08f069 Implement an initial HTTP Log.
  39a9e9f Fix widespread abuse of the 'f' colour character.
  9139335 Implement pruning of the Error and HTTP logs.
  0296cc5 Display all the details we have of an HTTP transaction.

Repository:     https://git.tartarus.org/simon/mastodonochrome.git
On the web:     https://git.tartarus.org/?p=simon/mastodonochrome.git
Branch updated: main
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2024-02-11 15:26:48

commit f566ce7e99f6c2e1da32e517e2093c5bb6ae997a
web diff https://git.tartarus.org/?p=simon/mastodonochrome.git;a=commitdiff;h=f566ce7e99f6c2e1da32e517e2093c5bb6ae997a;hp=2f0eeede2801fd16ee8612738151a2fd9f854a19
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Feb 11 10:46:34 2024 +0000

    TODO updates.
    
    Document some bugs and missing features I noticed recently, and also
    mention that I'm beginning to have doubts about my plan for rate
    limiting.

 TODO.md | 119 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 113 insertions(+), 6 deletions(-)

commit d08f069051014e67d0a8d83f3a90fae7b0b1ab3c
web diff https://git.tartarus.org/?p=simon/mastodonochrome.git;a=commitdiff;h=d08f069051014e67d0a8d83f3a90fae7b0b1ab3c;hp=f566ce7e99f6c2e1da32e517e2093c5bb6ae997a
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Feb 10 18:01:48 2024 +0000

    Implement an initial HTTP Log.
    
    This displays recent HTTP transactions, in a log containing a one-line
    summary of each one. My plan is that you should also be able to ask
    for the rest of the information about each transaction, but that's not
    implemented yet. This by itself is a start.

 src/activity_stack.rs |  1 +
 src/client.rs         | 86 ++++++++++++++++++++++++++++++++++++++++++++++--
 src/file.rs           | 37 ++++++++++++++++++++-
 src/help.rs           | 29 ++++++++++++++--
 src/menu.rs           |  6 ++++
 src/text.rs           | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++-
 src/tui.rs            |  7 ++++
 7 files changed, 250 insertions(+), 7 deletions(-)

commit 39a9e9f4dd90f03d54f394a45ad6b494f4d9d6ff
web diff https://git.tartarus.org/?p=simon/mastodonochrome.git;a=commitdiff;h=39a9e9f4dd90f03d54f394a45ad6b494f4d9d6ff;hp=d08f069051014e67d0a8d83f3a90fae7b0b1ab3c
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Feb 11 12:03:09 2024 +0000

    Fix widespread abuse of the 'f' colour character.
    
    'f' was intended as the lowercase form of 'F', and it's used for the
    darker green colour used to identify account names that aren't the
    originator of the post you're reading (whereas the bright green 'F' is
    used for the From: line, of the user who _is_ the originator).
    
    I've been in the bad habit of using 'f' when I want general non-bold
    green, in situations where it conveys a general "ok"-ness or
    "good"-ness, as opposed to indicating a username. That's semantically
    wrong, and would cause problems if anyone wants to change the colour
    scheme later.
    
    In the previous commit, I introduced a new colour 'g' which is also
    non-bold green, and used it for 2xx status codes in the HTTP Log. That
    seems like a semantically better match for all those things like
    'public' or 'verified' or 'yes' or 'ok' or 'valid'. So let's do a big
    switchover.

 src/help.rs    | 10 +++++-----
 src/login.rs   |  8 ++++----
 src/options.rs | 12 ++++++------
 src/text.rs    | 12 ++++++------
 src/types.rs   |  2 +-
 5 files changed, 22 insertions(+), 22 deletions(-)

commit 9139335b6ec2e74bb92edcdb45cfd5ff084f9847
web diff https://git.tartarus.org/?p=simon/mastodonochrome.git;a=commitdiff;h=9139335b6ec2e74bb92edcdb45cfd5ff084f9847;hp=39a9e9f4dd90f03d54f394a45ad6b494f4d9d6ff
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Feb 11 13:47:00 2024 +0000

    Implement pruning of the Error and HTTP logs.
    
    I've done this by extending the functionality of the existing 2-minute
    timer that checkpoints your LDB, renaming it to Heartbeat and using it
    to do multiple administrative jobs. So every 2 minutes, outdated log
    entries get deleted ...
    
    ... _except_ that they don't, if you're viewing the log in question at
    the time. That would be annoying to the user, and also require some
    faff in file.rs to cope with feeds unextending themselves
    spontaneously. So I've arranged that while any activity is in
    possession of an ErrorLogFileType or an HttpLogFileType, the logs stop
    pruning themselves.
    
    I thought of doing that by having a little struct that somehow
    incremented a reference to itself elsewhere, and decremented it again
    when dropped. But then I thought, hang on, it's easier to just reuse
    the thing like that which already exists! So LogLock is a wrapper
    around an Rc holding a totally boring empty type.
    
    At the moment, errors are kept for a day, and HTTP logs for an
    hour. (Rationale: there are more HTTP transactions, and I expect you'd
    mostly examine the HTTP log _in response_ to an error or some other
    oddity, so it's likely that the thing you're looking for is in very
    recent history.) It seems very likely that those will want to be
    configurable options sooner or later, so I've added that to TODO.md.

 TODO.md       |   6 +++-
 src/client.rs | 114 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 src/file.rs   |  16 ++++++---
 src/tui.rs    |   7 ++--
 4 files changed, 132 insertions(+), 11 deletions(-)

commit 0296cc5f970760912d13d8fe6182cc7b7588ead7
web diff https://git.tartarus.org/?p=simon/mastodonochrome.git;a=commitdiff;h=0296cc5f970760912d13d8fe6182cc7b7588ead7;hp=9139335b6ec2e74bb92edcdb45cfd5ff084f9847
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Feb 11 14:36:51 2024 +0000

    Display all the details we have of an HTTP transaction.
    
    The current TransactionLogEntry keeps the method, URL, status code and
    headers, so that's what we display.
    
    I think the response body will also be useful, but it's harder, so for
    the moment I've left it undone and written it up in TODO.md.

 TODO.md               |  24 +++++----
 src/activity_stack.rs |   1 +
 src/client.rs         |   6 +--
 src/file.rs           |  69 ++++++++++++++++++++++--
 src/help.rs           |  30 +++++++++++
 src/text.rs           | 141 ++++++++++++++++++++++++++++++++++++++++++++++----
 src/tui.rs            |   7 +--
 7 files changed, 249 insertions(+), 29 deletions(-)



More information about the tartarus-commits mailing list