v0.6: cross-platform feed on the dashboard, home units, napkin
dashboard.html — Feed and Timeline swap places; Feed is every platform's capture now, not Twitter intel, so rows carry their own platform glyph and an unknown platform renders neutral rather than being dropped. A row whose ts is really first_seen reads "seen X ago": saying "just now" for a post of unknown age is a lie that sorts it to the top. dashboard.json — regenerated by the refresher; _yt_caveat dropped, the activate fix made it stale. deploy/home — dash, openbridge, refresh service and timer for this desktop. Refresh every 30min with --skip-foreground, not kdmirah's 10min full pass: there is a human at this box and the metrics table only needs enough resolution to watch engagement move. No Restart= on the oneshot — a down browser is a waiting state the refresher records and exits 0 for. NAPKIN.md — the whiteboard: measured delay budget, the background-render table, the three landmines earned (a DOM signal is a rendering question, %z cannot come back out of struct_time, a pure time sort is not a feed), and the open calls. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
[Unit]
|
||||
Description=socialmag dashboard file server (:8321)
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/mnt/playground/Playground_V2
|
||||
# No --bind, matching how this was started by hand: the page is reachable from
|
||||
# abang's LAN, not only from this box. openbridge stays loopback-only, so a LAN
|
||||
# viewer just falls back to opening a new tab — progressive enhancement, and the
|
||||
# page is never worse than it was.
|
||||
ExecStart=/usr/bin/python3 -m http.server 8321
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,19 @@
|
||||
[Unit]
|
||||
Description=socialmag openbridge (:8322) — open_link over localhost HTTP
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/mnt/playground/Playground_V2
|
||||
Environment=PYTHONPATH=/mnt/playground/Playground_V2
|
||||
Environment=SOCIALMAG_CDP_ENDPOINT=http://127.0.0.1:9336
|
||||
ExecStart=/usr/bin/python3 -m socialmag.openbridge
|
||||
# openbridge refuses to move to another port if :8322 is taken — no silent
|
||||
# fallback — so a clash fails loudly here instead of listening somewhere nobody
|
||||
# is looking.
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,18 @@
|
||||
[Unit]
|
||||
Description=socialmag refresh — login states, Threads activity, X timeline capture
|
||||
# Brave is not a service on this box. There is nothing to order against, so a
|
||||
# pass that finds no CDP records the third state and exits 0.
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
User=root
|
||||
WorkingDirectory=/mnt/playground/Playground_V2
|
||||
Environment=PYTHONPATH=/mnt/playground/Playground_V2
|
||||
Environment=SOCIALMAG_CDP_ENDPOINT=http://127.0.0.1:9336
|
||||
# --skip-foreground is the whole reason this can run on a desktop abang is using.
|
||||
# Every other platform reads a JS-state signal in a hidden tab; tiktok still
|
||||
# activates, so it is left out and keeps its last stored result with its own
|
||||
# older checkedAt. Stale is honest. Drop the flag for a full pass by hand.
|
||||
ExecStart=/usr/bin/python3 -m socialmag.refresher --skip-foreground
|
||||
# No Restart=: a down browser is a waiting state the refresher records and exits
|
||||
# 0 for. The timer brings the next attempt, not a crash loop.
|
||||
@@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=socialmag refresh every 30 minutes
|
||||
|
||||
[Timer]
|
||||
# 2 min after boot so Brave has a chance to be up; a pass that finds no browser
|
||||
# still records the unknown state rather than skipping.
|
||||
OnBootSec=2min
|
||||
OnUnitActiveSec=30min
|
||||
# A pass takes ~28s with --skip-foreground. 30min is the desktop number, not
|
||||
# kdmirah's 10min: this box has a human at it, and the metrics table only needs
|
||||
# enough resolution to watch engagement move, not to watch it live.
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
Reference in New Issue
Block a user