Commit 7b70844
committed
feat(web): Interface A — Encode/Decode tabs + .pbf.json decode & metadata (issue #1)
Rebuilds the browser demo around explicit Encode/Decode tabs (Peter's pick) so
decoding is discoverable — the issue's core complaint. Decode accepts a pasted
block OR a dropped file, auto-routes container vs raw (decodeText), shows a
metadata panel (filename/size/modified/mode/integrity), and downloads the
restored file under its original name. Encode gains a .pbf.json container output
option (embeds filename + modified_ms + crc32).
Adds decodeText (decode-mode router, robust to raw output starting with '{') and
serializes container 'data' LAST so metadata sits up front (Peter's ask). JS
suite now 54 tests (routing + corrupt-container rejection + data-last order).1 parent 56d2c93 commit 7b70844
4 files changed
Lines changed: 411 additions & 463 deletions
File tree
- docs/plans
- js
- test/js
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | 45 | | |
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
50 | 49 | | |
51 | 50 | | |
52 | 51 | | |
53 | | - | |
| 52 | + | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
57 | 63 | | |
58 | 64 | | |
59 | 65 | | |
| |||
0 commit comments