Skip to content

fix: Ask reasons consistent with structured prices, stable language switch, subtitle translation, hydration, media allowlist - #59

Merged
Spoof14 merged 5 commits into
mainfrom
fix/ask-reasons-lang-consistency
Oct 11, 2026
Merged

Spoof14 merged 5 commits into
mainfrom
fix/ask-reasons-lang-consistency

Conversation

@Spoof14

@Spoof14 Spoof14 commented Oct 11, 2026

Copy link
Copy Markdown
Owner

Fixes from the real-browser retest of production.

  1. Reasons: model gets a pre-formatted per-language price line (e.g. 월세 보증금 3,000만원 / 월 40만원, 전세 1억 1,000만원); AI reasons are post-validated (wrong rent type, amounts not in the listing or in the wrong role, 'low deposit' not below the candidate median) and replaced by the deterministic reason.
  2. Language switch: new askLocalize route reuses stored constraints + picks (no interpretation/fetch/rank); client translates deterministically on the spot (never shows the old language) and upgrades reasons via the model when available.
  3. Subtitle: ListingSubtitle (glossary, else cached lazy short-title translation when OpenAI is configured, else original); Translate description now translates title + description together with a Korean original toggle.
  4. Hydration: relative listing age rendered after mount; lang resolution ?lang > cookie > localStorage written back to all three.
  5. /api/media: allow realty.asil.kr; https-only, default port, no credentials, no IP literals, manual redirect validation.
  6. 투룸: one-room/open-studio or <25 m² unknown listings are ranked last and deferred; deposit only called low when below candidate median; submitted query shown as 'Searching: …' while loading.

Verified: tsc, eslint (0 errors), vitest (466), next build, headless Chrome 27 cookie/localStorage/?lang combos + listing page, EN/KO screenshots.

@vercel

vercel Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ziggybang Ready Ready Preview Oct 11, 2026 11:04am UTC
ziggybang-5xjx Ready Ready Preview Oct 11, 2026 11:04am UTC

@Spoof14
Spoof14 merged commit 5522768 into main Oct 11, 2026
4 checks passed

This branch was successfully deployed

2 active deployments
Preview – ziggybang — dd8c2759 Deployed Oct 11, 2026 by vercel[bot]
Preview – ziggybang-5xjx — dd8c2759 Deployed Oct 11, 2026 by vercel[bot]
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