bep40 commited on
Commit
5e926c8
·
verified ·
1 Parent(s): a4e64bb

Upload CHANGELOG.md

Browse files
Files changed (1) hide show
  1. CHANGELOG.md +20 -29
CHANGELOG.md CHANGED
@@ -1,36 +1,27 @@
1
- # VNEWS v5 - Match Detail Fix
2
 
3
  ## Changes
4
 
5
- ### 1. match_detail_v2.py Rewrote event parser with correct selectors
6
- - Parse `.events > .period > .event` structure (not old `.timeline`)
7
- - Extract event type from SVG icons in `.event-type` (goal/redcard/yellowcard/substitution)
8
- - Parse player names from `.players > div` elements
9
- - For goals: extract scorer + assist names
10
- - For substitutions: extract player_out → player_in
11
- - For cards: extract player name
12
- - Normalize time format: `45' +2` → `45+2'`
13
- - Fetch H2H stats from `/api/fixtures/h2h-stats` API
14
- - Parse prediction card, recent matches, H2H standings
15
 
16
- ### 2. static/match_detail.js — Complete rewrite with 2-tab layout
17
- - **Tab "Thống kê"**: H2H stats comparison, prediction vote, recent match results
18
- - **Tab "Diễn biến"**: Detailed timeline with:
19
- - BÀN THẮNG scorer name + assist
20
- - 🟥 THỺ ĐỎ player name
21
- - 🟨 THỺ VÀNG player name
22
- - ↔️ THAY ĐỔI — player_out → player_in
23
- - Period grouping (H1, H2) with visual headers
24
- - Team badges (HOME/AWAY) per event
25
- - Color-coded event icons
26
 
27
- ### 3. app_v2_entry.pyUpdated
28
- - Module cache clearing for fresh match_detail_v2 import on each API call
29
- - Single clean import for both `/detail` and `/live` endpoints
30
- - Removed duplicate inline scraping code
31
 
32
- ### 4. _run.pyFixed import
33
- - Changed `import match_detail` to `import match_detail_v2`
 
 
 
34
 
35
- ### 5. Dockerfile — Cache busting
36
- - Added `RUN date > /app/.build_timestamp` to force Docker rebuild
 
 
 
 
1
+ # VNEWS v5.1 - Rewrite Fix
2
 
3
  ## Changes
4
 
5
+ ### Critical Fix: Rewrite button not creating posts on Tường AI
6
+ **Root cause**: `_run.py` imports from `app_v2_entry.py`, but the `/api/rewrite_share` endpoint was only defined in `ai_runtime_patch_fast.py` (loaded through `app_entry.py` which is NOT used). The frontend called a non-existent endpoint → 404 → silent failure.
 
 
 
 
 
 
 
 
7
 
8
+ **Fix applied**:
9
+ 1. **app_v2_entry.py** Added 3 new endpoints:
10
+ - `POST /api/rewrite_slide` Fast extractive summary (no AI needed), creates slides from article key points + images, saves to wall
11
+ - `POST /api/rewrite_share`AI-powered rewrite with extractive fallback, saves to wall
12
+ - `POST /api/url_wall`URL submission endpoint (alias for rewrite_share)
13
+ - All endpoints use the same `_load_wall_posts()` / `_save_wall_posts()` and `WALL_FILE` path as the existing `/api/wall` endpoint
 
 
 
 
14
 
15
+ 2. **static/index_v2.html**Added `<script src="/static/rewrite_fix_v2.js"></script>` to load the rewrite fix
 
 
 
16
 
17
+ 3. **static/rewrite_fix_v2.js**New file that overrides `rewriteArticle()` to:
18
+ - Call `/api/rewrite_slide` first (fast, no AI needed)
19
+ - Fallback to `/api/rewrite_share` if slide fails
20
+ - Show slide preview overlay after successful post
21
+ - Use `prependWallPost()` to add the new post to Tường AI
22
 
23
+ ### Previous changes (v5)
24
+ - Rewrote match_detail_v2.py with correct event parsing
25
+ - 2-tab layout for match detail (stats + timeline)
26
+ - Fixed _run.py import
27
+ - Dockerfile cache busting