91a6893df9
Manson's objection was that requiring a username and a verified email pulls the
build back toward a centralized database of members. He is right, and the
communication gap is real too, so the answer is to ask well rather than to force.
Nothing about holding a position, getting paid, reading the org, the training or
the tools depends on contact details any more. There is no onboarding gate: a
brand-new member registers, lands on their page and is never stopped by a modal.
The dashboard offers a dismissable card ("Not now" snoozes it for a week) that
leads with the thing members actually want, a note the moment a payout lands in
their wallet, and says outright that everything works the same without it. The
inbox is the one place that asks, because a message cannot be delivered to
someone who left no way to reach them, and even there it is an invitation.
The card sits above the tab strip rather than inside the dashboard pane: the page
opens on the pitch tab, so an invitation parked in the dashboard would never be
seen by the new members it is aimed at.
For leaders, /api/public/reach answers "how many of my org can I reach off the
site", scoped by chain.isInTeam so it leaks nothing upward or sideways. That
makes coverage a leader's own problem to solve by asking, not a rule imposed on
members.
Fixes a real bug found by the rewritten suite: the dismissable flag double-booked
as "single-field edit", so saving a username in the opt-in flow closed the dialog
instead of advancing to the email step. Split into oneShot; the suite now asserts
the advance as a regression.
QA, all green: profiles-unit 28, signin-fallback 7, gate-e2e 33 (rewritten to
assert the opposite of what it used to: no forced modal, dismissable everywhere,
visitors unaffected), join-flow 12 cold / 11 refuse / 12 warm.
qa/reseed.sh carries two hard-won guards: never name a shell variable TMP on
Windows (it inherits the system temp dir and rm -rf wipes it), and never pkill.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
36 lines
2.1 KiB
Bash
36 lines
2.1 KiB
Bash
#!/usr/bin/env bash
|
|
# Rebuild a throwaway data dir + server for the profile E2E suite.
|
|
# The suite completes a profile for 21, so it is NOT idempotent: reseed every run.
|
|
#
|
|
# Two rules learned the hard way, do not undo them:
|
|
# * NEVER name the data-dir variable TMP/TEMP/TMPDIR. On Windows those are already
|
|
# set to the system temp directory, so `${TMP:-default}` silently inherits it and
|
|
# the rm -rf below wipes the machine's temp folder instead of the throwaway dir.
|
|
# * NEVER add pkill/taskkill. A broad pattern kills the tooling running this script.
|
|
# Stop the old server through the pid file instead.
|
|
#
|
|
# Usage: bash qa/reseed.sh (then read $RMCQA_DIR/tokens.txt)
|
|
set -e
|
|
RMCQA_DIR=${RMCQA_DIR:-/d/tmp/rmc-e2e-data}
|
|
PORT=${PORT:-3399}
|
|
case "$RMCQA_DIR" in
|
|
/d/tmp/*|/D/tmp/*) ;;
|
|
*) echo "refusing: RMCQA_DIR must live under /d/tmp (got '$RMCQA_DIR')"; exit 2 ;;
|
|
esac
|
|
if [ -f "$RMCQA_DIR/server.pid" ]; then kill "$(cat "$RMCQA_DIR/server.pid")" 2>/dev/null || true; sleep 2; fi
|
|
rm -rf "$RMCQA_DIR"; mkdir -p "$RMCQA_DIR"
|
|
if [ -f /d/tmp/rmc-config-cache.json ]; then cp /d/tmp/rmc-config-cache.json "$RMCQA_DIR/config.json";
|
|
else ssh -o StrictHostKeyChecking=no root@coolify.saasy.top \
|
|
"docker exec \$(docker ps -q --filter name=kr445fqc) cat /app/data/config.json" > "$RMCQA_DIR/config.json"
|
|
cp "$RMCQA_DIR/config.json" /d/tmp/rmc-config-cache.json; fi
|
|
echo '[]' > "$RMCQA_DIR/sponsors.json"
|
|
echo '{"49":{"email":"seeded49@example.com","ts":"x"}}' > "$RMCQA_DIR/member-alerts.json"
|
|
node -e "const m=require('./messages.js'); m.init({dataDir:process.argv[1],chain:require('./chain.js'),isProd:false}); require('fs').writeFileSync(process.argv[1]+'/tokens.txt', m.mintSession(21)+'\n'+m.mintSession(49));" "$RMCQA_DIR"
|
|
PORT=$PORT DATA_DIR=$RMCQA_DIR ADMIN_PASSWORD=localtest node server.js > "$RMCQA_DIR/server.log" 2>&1 &
|
|
echo $! > "$RMCQA_DIR/server.pid"
|
|
for i in $(seq 1 40); do
|
|
if [ "$(curl -s -o /dev/null -w %{http_code} "http://127.0.0.1:$PORT/my/21" 2>/dev/null)" = "200" ]; then echo "ready on $PORT"; exit 0; fi
|
|
sleep 1
|
|
done
|
|
echo "server did not come up"; tail -20 "$RMCQA_DIR/server.log"; exit 1
|