Page MenuHomePhabricator

[native] Create a place where logs are stored and can be displayed
ClosedPublic

Authored by tomek on Feb 5 2025, 10:02 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Mar 14, 7:59 AM
Unknown Object (File)
Fri, Mar 14, 7:59 AM
Unknown Object (File)
Fri, Mar 14, 7:59 AM
Unknown Object (File)
Fri, Mar 14, 7:34 AM
Unknown Object (File)
Fri, Mar 14, 7:30 AM
Unknown Object (File)
Mon, Mar 3, 6:50 AM
Unknown Object (File)
Mon, Mar 3, 6:50 AM
Unknown Object (File)
Sat, Mar 1, 4:20 AM
Subscribers

Details

Summary

The logs are stored in a new context. We could use Redux for that, but the benefits would be quite limited because we don't need to persist the logs. We can always consider changing the approach and persist them, but they are a simple replacement to the alerts, which aren't persisted as well.

The logs are displayed on a new staff-only screen accessible from the profile screen. It is possible to clear them and copy to a clipboard.

logs-web-settings.png (334×1 px, 25 KB)

logs-web-empty.png (1×1 px, 67 KB)

logs-web-full.png (1×1 px, 183 KB)

logs-moved-buttons.png (2×1 px, 200 KB)

https://linear.app/comm/issue/ENG-10140/replace-staff-alerts-with-a-log

Test Plan

Added a button that results in adding ew logs. Tested if they are displayed correctly on the screen, can be copied, and cleared.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Feb 5 2025, 10:20 AM
Harbormaster failed remote builds in B33396: Diff 46923!
Harbormaster returned this revision to the author for changes because remote builds failed.Feb 6 2025, 2:07 AM
Harbormaster failed remote builds in B33406: Diff 46933!
tomek requested review of this revision.Feb 6 2025, 4:46 AM
kamil requested changes to this revision.Feb 10 2025, 3:18 AM

A lot better experience than spamming with Alerts.

One thing we discussed offline - web support which has the same issues. We can render this on the web too and log in console (but make sure logging is not removed in the prod bundle) or implement a similar dedicated screen, you can re-use e.g. component to show Tunnelbroker messages we have for staff

native/profile/debug-logs-screen.react.js
2

nit: newline

48–50

Nit: I would render buttons below list but this is debug screen anyway so doesn't really matter

This revision now requires changes to proceed.Feb 10 2025, 3:18 AM
This revision is now accepted and ready to land.Feb 12 2025, 1:54 AM