Commit Graph

43 Commits

Author SHA1 Message Date
Jesse_Chen b6a70aa7df fix(ayanamsa): pin Lahiri on reference sets and add a user setting
Product default stays Raman. Public-case revalidation and fixture dashas now pass --ayanamsa lahiri; profiles store the four selectable values.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-03 16:33:46 +08:00
Jesse_Chen 53017d4153 fix(rectification): reveal the surface once — hydrate the Case before the switch, never remount, static entry feedback
Opening a rectification Case used to switch sessions first and read the
turns afterwards, so the reader saw a plain transcript, then an empty
panel, then a remount when the turns arrived (and again after the first
turn settled, because the panel key carried a ready/loading suffix).
The surface hook now reads turns and snapshot in one Case request under
the home reveal budget and only then makes the session active; the
sidebar defers the switch the same way; a session selected at bootstrap
(deep link, refresh) is hydrated during the prepare phase so the reveal
shows the surface itself; the panel key is the session/Case binding only,
later turns fill an empty transcript as a prop update, and unmounting
aborts any stream or snapshot read. The homepage card and the sidebar row
say 正在打开 statically while the Case opens — no spinner after the reveal.

BUG-505

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JUei7K13cYxLHE3Axe4A45
2026-09-03 07:07:31 +00:00
Jesse_Chen e8c98c37cf fix(rectification): restore collect-phase exit and drop the consult handoff
Independent Staging Quality Gate / validate (push) Successful in 8m29s
Independent Staging Quality Gate / publish (push) Successful in 1m45s
Public can_adopt no longer starves the collect fallback, 改选 scrolls to
the offer, opening collect uses other, and probe_year stays on the
schema. The status bar no longer starts an empty consultation chat.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-03 10:41:36 +08:00
Jesse_Chen d94049769e fix(rectification): put each question inside the assistant message
Independent Staging Quality Gate / validate (push) Successful in 25m7s
Independent Staging Quality Gate / publish (push) Successful in 2m8s
Focuses now carry asked_turn_id so GET rebuilds stem and options on the
same turn. Agent writes spokenPrompt; the live question slot is gone.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-02 19:55:20 +08:00
Jesse_Chen f542c02490 refactor(chat): share composer, scroll follow and jump control across both chat surfaces
The rectification session rendered its own textarea (no length ceiling,
no count), its own rAF scroll follow with a sticky-scroll helper, and its
own jump chip styled differently from the main chat's inline Tailwind
button, while the main chat re-ran scrollTo on every streamed token and
added a smooth scroll on settle. ChatComposer now accepts a controlled
value so the rectification surface reuses it without touching the main
draft store; useConversationScrollAnchor owns the follow through a
ResizeObserver, one frame per content change, for both surfaces; a
single JumpToLatestButton replaces both chips; the 720px transcript
override is gone. DESIGN.md records the shared composer, the jump
control, the reading width and the two shadow tokens.

BUG-477 BUG-478

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JUei7K13cYxLHE3Axe4A45
2026-09-02 04:29:01 +00:00
Jesse_Chen ad9dba5c79 perf(chat): coalesce stream events per frame and pace text release
Every NDJSON event used to commit its own React update and re-parse the
whole partial answer through react-markdown, so long replies grew
quadratically slower. Stream events now land in a frame buffer that
flushes at most once per animation frame, releases answer and thinking
text at a steady pace with a twelve-frame catch-up, and settles
synchronously on completion, failure and abort. Streaming markdown is
split at the last completed block so only the tail is re-parsed each
frame. Applied to both the consultation hook and the rectification chat.

BUG-473

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JUei7K13cYxLHE3Axe4A45
2026-09-02 04:29:01 +00:00
Jesse_Chen 058e5db9b5 fix(chat): make Home pass react-hooks lint after the split
Independent Staging Quality Gate / validate (push) Successful in 17m39s
Independent Staging Quality Gate / publish (push) Successful in 7m11s
eslint-plugin-react-hooks now analyzes the smaller Home, so render-time ref writes and sync effect setState were failing the staging gate.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-02 07:01:36 +08:00
Jesse_Chen bf6989eccf refactor(chat): extract profile onboarding and rectification surface hooks
Close the home-page split by moving account/onboarding and rectification glue out of page.tsx without relocating React state, keeping the route static and hook order intact.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-02 05:56:58 +08:00
Jesse_Chen 551d6317ae refactor(chat): extract consultation and session hooks after contract repairs
Independent Staging Quality Gate / validate (push) Has been cancelled
Independent Staging Quality Gate / publish (push) Has been cancelled
Keep archive as a PATCH of archived_at rather than DELETE, pass entry_mode through onboarding, and let popstate to the default chat reuse selectSession. Then move send/stop/recovery and session management out of page.tsx so the home surface stays within the batch-two line budget.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-02 04:34:14 +08:00
Jesse_Chen 9c296f1e3f fix(ux): surface hidden notices, bound report waits, add root boundaries
Independent Staging Quality Gate / validate (push) Successful in 12m8s
Independent Staging Quality Gate / publish (push) Successful in 14m29s
Framework-level UX fixes found while auditing staging (BUG-216..220).

- chat: route 44 previously discarded composer notices to sonner with
  dedupe, so recovery, cancel and archive feedback is actually visible
  (BUG-216)
- chat: anchor stream auto-scroll to bottom proximity and add a
  jump-to-latest control, so reading history is no longer interrupted
  on every token (BUG-218)
- reports: replace the silent 120s poll cutoff with an explicit
  timed-out state, an 8m budget, stepped backoff and an elapsed
  counter (BUG-217)
- reports: pause polling while the tab is hidden, via a shared hook
- app: add root error, global-error and not-found boundaries (BUG-219)
- admin: add antd SSR style extraction and the React 19 render adapter,
  and move admin-only css out of the global stylesheet (BUG-220)
- membership: run bootstrap fetches concurrently and pause payment
  polling while hidden
- build: configure optimizePackageImports

Verified on top of 2d370f2e: tsc, eslint, next build, and the related
frontend contract suites.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-17 13:14:15 +08:00
Jesse_Chen f3946eaa6f chore: retire legacy rectification runtime
Staging Backend Quality Gate / validate (push) Failing after 9m57s
Staging Backend Quality Gate / publish (push) Has been skipped
2026-08-07 12:55:32 +08:00
Jesse_Chen e9d20382d9 fix: keep rectification questions context-aware 2026-07-30 07:58:06 +08:00
Jesse_Chen 0a5b8cd239 fix: restore rectification agent message actions 2026-07-30 00:41:48 +08:00
Jesse_Chen a550b98da7 refactor: make birth time rectification conversational 2026-07-27 22:33:12 +08:00
Jesse_Chen 2ca245d643 feat: rebuild birth time rectification workflow 2026-07-27 09:57:14 +08:00
Jesse_Chen 8150df8942 fix: preserve rectification streaming and history 2026-07-25 02:08:10 +08:00
Jesse_Chen 3ca30ed7de feat: complete minute birth-time rectification flow 2026-07-25 01:17:14 +08:00
Jesse_Chen 73cafeb6e0 fix: stream validated rectification replies 2026-07-23 15:45:42 +08:00
Jesse_Chen 685f322981 fix: restore conversational rectification history 2026-07-23 14:26:35 +08:00
Jesse_Chen f9010c8797 feat: make birth-time rectification conversational 2026-07-23 13:12:09 +08:00
Jesse_Chen 7836c85758 merge: resolve self-hosted identity main conflicts 2026-07-22 09:43:11 +08:00
Jesse_Chen f25aad526c merge: synchronize remote main 2026-07-21 22:57:50 +08:00
Jesse_Chen bfc6870614 feat: complete verifiable birth-time rectification flow 2026-07-21 22:16:18 +08:00
Jesse_Chen a38a096ba1 fix: normalize automatic birth-time errors 2026-07-21 17:54:27 +08:00
732642856 9154ec5ef1 fix: keep unconfirmed candidates in rectification 2026-07-21 16:06:30 +08:00
Jesse_Chen eb8ed8bee4 Merge branch 'feat/conversational-birth-time-rectification'
# Conflicts:
#	.github/workflows/deploy-production.yml
#	frontend/src/app/api/account/route.ts
#	frontend/src/app/globals.css
#	frontend/src/app/page.tsx
#	frontend/tests/health-deployment.test.ts
2026-07-21 16:03:53 +08:00
Jesse_Chen 8be39d5ad6 fix: harden birth-time consultation modes 2026-07-21 07:25:02 +08:00
Jesse_Chen 887b40df43 fix: persist rectification evidence corrections 2026-07-21 05:23:51 +08:00
Jesse_Chen c68f4e5f4f fix: isolate rectification UI mutations 2026-07-21 04:48:30 +08:00
Jesse_Chen 741a395a77 fix: harden conversational rectification UI 2026-07-21 04:23:59 +08:00
Jesse_Chen 4d8c5268d3 feat: render conversational rectification 2026-07-21 03:46:11 +08:00
732642856 2953f0b2d7 fix: permit chart profile upserts 2026-07-20 16:52:53 +08:00
732642856 b30308a591 fix: harden mobile rectification recovery 2026-07-20 15:55:59 +08:00
Jesse_Chen 7ef8f7c146 fix: block legacy dynamic candidate adoption 2026-07-20 15:11:42 +08:00
Jesse_Chen 8f98e8585d fix: confirm dynamic birth-time candidates 2026-07-20 14:58:57 +08:00
Jesse_Chen c22dea9979 feat: complete birth time consultation handoff 2026-07-19 14:51:06 +08:00
Jesse_Chen bfd49760ed fix: complete dynamic choice preview flow 2026-07-19 10:51:49 +08:00
Jesse_Chen c74c0bd70f feat: add click-first birth time questions 2026-07-19 10:39:47 +08:00
Jesse_Chen db5c12f67f fix: preserve dynamic action receipts 2026-07-19 10:12:18 +08:00
Jesse_Chen 806d2babbf feat: expose dynamic rectification actions 2026-07-19 09:45:32 +08:00
Jesse_Chen 7ecd1be663 feat: add agent guided birth time rectification 2026-07-18 18:40:23 +08:00
Jesse_Chen 62382d9828 fix: tighten composable sidebar primitives 2026-07-17 17:32:42 +08:00
Jesse_Chen c45f21e8d8 feat: add composable sidebar primitives 2026-07-17 17:17:10 +08:00