Public: anyone can read this; the crew can change it.

The agent puts their own name, brokerage, phone and email on the app from a Profile page, so the sales meeting shows their name without a redeploy #63

Closed opened this has it

Landed in pull #67 · 2 runs · run

opened this

Intent: in the meeting the agent types their own details once, and the header, client timeline and every new reminder's sign-off carry them at once.

Today the agent is read from DEAL_CLOCK_AGENT / DEAL_CLOCK_BROKERAGE / phone / email environment variables (src/env.ts agent). Changing them means a redeploy, which no realtor can do.

Done looks like:

Files: src/env.ts, new src/profile.ts + test, src/db.ts, src/pages/profile.ts, src/pages/layout.ts, src/routes.ts, src/mcp.ts, src/openapi.ts, src/reminders.ts callers, contract.json, README.md, docs/TECHNICAL.md. Risks: drafts are memoized on JSON.stringify(agent), which stays correct only if the live profile is passed in. A new contract resource is shown to a person before it lands. Suggested: mason.

2 earlier comments · 1 event
the crew's run was interrupted: restart, resumes on the next pass — cancelled
commented

Reviewed pull #67 at its head: ticked Saved values live in one row in sqlite under FORGE_APP_DATA (src/db.ts migration). The environment variables stay the defaults until a value is saved. A Use defaults button clears the row.; Header, client timeline, welcome page, every unsent draft's sign-off, the ICS files and the terminal read the saved profile. Already-sent messages keep the words that went out (a test asserts it).; Who may save it is decided in contract.json as a new resource profile (read: user, update: the least role mayRestore in src/actions.ts already requires, create/delete/list: nobody) and checked through permit. No existing cell changes. The save is same-origin checked and written to the audit log.; GET/PUT /api/profile (in src/openapi.ts) and MCP get_profile / set_profile apply the same rules.; Tests: saving changes the header and a fresh draft's sign-off; an invalid email is a 400 / refused form; a role below the required one is refused; Use defaults restores the env values; the clock still meets its speed budget (the profile is read once per request, not per draft).; The README replaces "set these environment variables" with "open Profile", and keeps the variables in docs/TECHNICAL.md as defaults..

commented

Left open after pull #67 landed: 1 unticked item remains (A Profile page (/profile, linked from the header when signed in) has four labelled fields prefilled with the current values. They are validated at the boundary with the same rules env.ts uses (name and brokerage 1–80 characters, validPhone, validEmail). A refused form keeps what was typed and names the field, as New deal does.). The planner files each as its own issue and closes this one; a person may close it, tick what is done, or say what is left. Until then the crew does not pick it again.

commented

Already done on main in 2276821. /profile is linked from the header for anyone signed in (src/pages/layout.ts:87). Its four labelled fields are prefilled, and checkProfile in src/profile.ts checks them with env.ts's validPhone/validEmail and the 1–80 rule. A refused form returns 422, keeps what was typed and names the field (src/pages/profile.ts). Tests: src/profile.test.ts "a refused form keeps what was typed and names the field". The open box is met.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs