Commit 8807c12
committed
WIP: attempt stepPush/stepReplace sync - has regression
**Attempted:**
Implemented onPopState synchronization for stepPush and stepReplace on
lower activities to sync history when navigating back.
**Implementation:**
- Case 1: History has step that doesn't exist in core → sync
- Case 2: History has no step but core has steps → sync
**Problem:**
Case 2 condition `!targetStep && coreSteps.length > 0` is too broad and
triggers for normal activity navigation, causing regression.
**Failed Tests:**
- ✗ "히스토리를 여러번 back하더라도" (regression)
- ✗ "stepPush on lower activity syncs when navigating back" (new test)
**Root Cause:**
Cannot distinguish between:
1. [A] [B] → stepPush to A → [A(step)] [B] → back (should sync)
2. [A] [B(step)] → back to A (normal, should not sync)
Both cases have `!targetStep` when arriving at A.
**Options to Consider:**
1. Revert to stepPop-only (safe but incomplete)
2. Add "modified" marker to history state (complex)
3. Only handle step count increase: `coreSteps.length > historySteps.length`
(safer but doesn't handle stepReplace)
**Status:**
2 tests failing, 28 passing. Need decision on approach.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent d951a66 commit 8807c12
2 files changed
Lines changed: 78 additions & 14 deletions
Lines changed: 40 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1558 | 1558 | | |
1559 | 1559 | | |
1560 | 1560 | | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
1561 | 1601 | | |
Lines changed: 38 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
399 | 399 | | |
400 | 400 | | |
401 | 401 | | |
402 | | - | |
| 402 | + | |
403 | 403 | | |
| 404 | + | |
404 | 405 | | |
405 | 406 | | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
| 407 | + | |
410 | 408 | | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
420 | 444 | | |
421 | 445 | | |
422 | 446 | | |
| |||
0 commit comments