Thugcode iPhone · current design

A browser copy of the app as it is now. Tell me what to change by screen number, e.g. "3: bigger thread titles".

9:41
Connect to your PC
Follow your Thugcode threads, reply, approve and stop them from your iPhone, while your PC does the work.
Your PC's address
192.168.1.5 or a link
Continue
1On your PC, open Thugcode → Settings → Connect your phone and turn phone access on.
2Create an account there (a name and password), so this iPhone can sign in.
3Type the address it shows. This iPhone needs to be on the same Wi-Fi, or on Tailscale.
9:41
Sign in
With the name and password of the account you made in Thugcode on your PC (Settings → Connect your phone).
vps-e1df10bb
vps.thug.codes
Change
Name
Password
Sign in
Your password never leaves this iPhone: it proves you know it, and the PC gives this iPhone its own key.
9:41
Threads
9:41
Fix the flaky login testwebshop · Claude · Ask first
Found it. The test signs in, then immediately checks the session cookie, but createSession() writes the session row after sending the response:
  1. The response goes out with the cookie
  2. The test reads /api/me before the insert commits
  3. Under CI load that race loses about 20% of the time
The fix is to await the insert before replying:
const session = await sessions.insert(user.id); res.cookie('sid', session.id);
Edit src/server/session.ts
Context compacted to save space

Allow Bash?

Run the login test 50 times to confirm the fix
npm test -- auth/login --repeat 50 --runInBand
Allow onceAlwaysDeny
Then add a regression test for the raceQueued
Queue a message
9:41
Move nightly backups to S3infra · Claude · Ask first
The script dumps Postgres with pg_dump and copies it with rsync. Before I change it, two choices:

Claude has a question

Storage
Which storage class should old backups move to?
Glacier Instant RetrievalCheap, restores in milliseconds
Glacier Deep ArchiveCheapest, restores take hours
Keep in StandardSimplest, costs the most
Scope
Which databases should be included?
orders
users
analytics
Send answersSkip
Queue a message
9:41
Plan settings sync between machinesthugcode · Claude · Plan
Plan how settings could sync between my two PCs. Don't change anything yet.
Used 3 tools

Approve this plan?

Settings sync
  1. Split settings into portable (theme, keys, models) and per-machine (window size, paths)
  2. Write portable settings to sync.json in a folder the user picks
  3. Watch the file and merge changes, newest field wins
No network code: the folder does the syncing.
Approve, accept edits
Approve, ask before edits
Keep planning
Queue a message
9:41
Add a native iPhone appthugcode · Claude · Accept edits
Build a native SwiftUI client for the phone API.
Starting with the models and the network layer.
Read native/src/phone.cpp
Write ios/Thugcode/Net/API.swift
Write ios/Thugcode/Model/AppModel.swift
Worked for 2m 14s
Now the thread view, please.
1 image
Write ios/Thugcode/Views/ThreadView.swift
● Claude is working
Queue a message
9:41
CancelNew ThreadStart
Project
THProjectthugcode
Message
What should it work on?
It runs on your PC, in this project, as if you'd started it there.
9:41
Threads
Can't reach your PC
Check that Thugcode is running with phone access on, and that this iPhone is on the same Wi-Fi (or Tailscale).
Try Again