Skip to content

README & usability fit and finish#17

Merged
paulyuk merged 8 commits into
mainfrom
paulyuk/readme-usability-fit-and-finish
Jun 17, 2026
Merged

README & usability fit and finish#17
paulyuk merged 8 commits into
mainfrom
paulyuk/readme-usability-fit-and-finish

Conversation

@paulyuk

@paulyuk paulyuk commented Jun 16, 2026

Copy link
Copy Markdown
Member

What

Four small, related fit-and-finish fixes to the README + first-run UX. Each commit stands alone; bundling here per author preference.

# Commit Files Why
1 Fix hydrate-local-settings next-step hint infra/scripts/hydrate-local-settings.{sh,ps1} Script printed Run 'func start', but the README's local-run workflow needs three terminals (azurite, func start, chat client). Replaces the one-liner with the real three-terminal hint so the script output matches the docs.
2 README: move 'Make it yours' before 'Clean up' README.md Customize-before-teardown reads more naturally. Promotes both into Quickstart as numbered steps.
3 README: add 'Go live' step before deploy README.md New Quickstart step 5: Go live that sets MAILBOX_OWNER_EMAIL + Teams ids before azd up, so the very first deploy is LIVE instead of placeholder DRY-RUN.
4 azure.yaml: hydrate local.settings.json in postdeploy azure.yaml Fixes a real split-brain: azd env set X + azd provision pushes new values to the deployed Function App but silently leaves local.settings.json stale, so the chat client falsely reports 🟡 Partial even though the deployed app is LIVE. Chaining hydrate into postdeploy keeps both in sync from one source of truth (azd env).

Final Quickstart numbering after this PR

  1. Install the tools
  2. Get the resources you need
  3. Run the local client
  4. Try it (offline, safe)
  5. Go live (set your recipient and Teams target) ← new
  6. Deploy to Azure, then try it again
  7. Make it yours ← was a top-level ## after Quickstart
  8. Clean up ← was a sub-step before Make it yours

Repro of the split-brain bug fixed by commit 4

  1. Fresh azd up (placeholders in azd env).
  2. azd env set MAILBOX_OWNER_EMAIL me@tenant.com
  3. azd provision — deployed Function App now LIVE (verified via az functionapp config appsettings list).
  4. uv run python chat.py — doctor reports 🟡 Partial: MAILBOX_OWNER_EMAIL is a placeholder.

Because step 3 leaves local.settings.json stale and the chat client reads from there.

With commit 4, step 3's postdeploy rehydrates local.settings.json automatically and the chat client correctly shows �� LIVE on next launch.

Risk

  • All scripts touched are idempotent.
  • azure.yaml change just chains two existing scripts in a single hook — if hydrate fails, && (or the powershell if ($LASTEXITCODE...)) stops the chain, same behavior as today.
  • No new dependencies, no API/contract changes.

Out of scope (filed separately)

  • #14 — postdeploy hook can race the function-host cold start for the connector_extension system key (separate bug, separate fix).

Tested

Locally end-to-end on ~/src/m365-test1 with azd up, azd env set, azd provision, uv run python chat.py. Doctor flips 🟡 → 🟢 with no manual hydrate.

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

paulyuk and others added 5 commits June 16, 2026 14:46
The script printed 'Run func start to start the host', which is
incomplete and skips the actual local-run workflow documented in the
README:

  azurite --silent --skipApiVersionCheck --location .azurite  # terminal A
  uv run func start                                           # terminal B
  uv run python chat.py                                       # terminal C

Updated both the bash and PowerShell variants to print the three-terminal
block so users land on the working path without re-reading the README.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Customize-before-teardown reads more naturally. Promotes 'Make it yours'
into step 6 of the Quickstart, with 'Clean up' as the closing step 7.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sets MAILBOX_OWNER_EMAIL (required for LIVE mail) and the optional
TEAMS_TEAM_ID / TEAMS_CHANNEL_ID before `azd up`, so the deployed
agents are LIVE on first deploy instead of starting in DRY RUN with
placeholder values. Renumbers the trailing Quickstart steps.

Stacks on top of #13 (Make it yours before Clean up).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Chain hydrate-local-settings before configure-trigger so 'azd up' /
'azd provision' keeps both the deployed Function App app settings AND
local.settings.json in sync from the same source of truth (azd env).

Today, 'azd env set MAILBOX_OWNER_EMAIL ...' followed by 'azd provision'
pushes the new value to the deployed app but leaves local.settings.json
stale — the local chat client then reports 'Partial: placeholder' even
though the deployed app is correctly LIVE.

Stacks on #15.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The 'Show config readiness' doctor only inspected env vars; if the local
Functions host wasn't running, you'd only learn that when an agent call
failed with a generic 'Connection refused'. And there was no documented
way to point chat.py at the deployed cloud Function App.

This adds:

  * `infra/scripts/use-cloud-host.{sh,ps1}` — sourceable helpers that
    export AGENT_URL + FUNCTION_KEY from `azd env` + `az functionapp
    keys list`, so the chat client hits the deployed Function App in
    Azure without running azurite + func start locally.

  * Doctor (option 4) shows a new 'Functions host' row up top with
    🟢/🔴 + which host (local vs cloud) is being targeted and whether
    it's reachable.

  * When a chat call fails with a connection error, the hint now spells
    out BOTH paths: the 3-terminal local setup AND the one-liner to
    switch to the deployed cloud host.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@paulyuk

paulyuk commented Jun 16, 2026

Copy link
Copy Markdown
Member Author

Added 5th commit: chat.py doctor now probes the Functions host (🟢/🔴 reachable, local vs cloud) and the connection-refused error spells out both paths (3-terminal local or one-liner cloud). Plus infra/scripts/use-cloud-host.{sh,ps1} — sourceable helpers that export AGENT_URL + FUNCTION_KEY from azd env + az functionapp keys list so chat.py hits the deployed Function App without running azurite + func start locally.

Tested live in a deployed env: doctor flips local 🔴 → cloud 🟢 after source ./infra/scripts/use-cloud-host.sh.

paulyuk and others added 3 commits June 16, 2026 15:08
Daily Briefing is the most concrete, demo-able value of the agent — it's
what people see on day one once they've deployed. Lead with it and use
the full noun phrase 'Daily Briefing' (matches the menu label in chat.py
and the agent name) instead of the verb-form 'Brief'.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@paulyuk paulyuk merged commit 441836f into main Jun 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants