Commit f7a44a7
committed
feat(serve): artifact view source link opens the /source viewer at the artifact line (REQ-243, #623)
The artifact detail view showed the source file but the link was a dead
`href="#"` that did nothing in a plain browser — it only worked via the
VSIX editor shim. It now deep-links into the built-in `/source` viewer at
the artifact's definition line (hx-get + hx-push-url, scrolling to the
line), while keeping the `data-source-file`/`data-source-line` attributes
so the VSIX webview shim still opens the file in the editor. The VSIX
webview loads no htmx, so the two runtimes don't collide: browser follows
hx-get, VSIX follows the shim.
Off-by-one: the `/source` viewer numbers rows 1-based, so the browser
scroll target is `source_line + 1`; `data-source-line` stays 0-based for
the VSIX host, which consumes it as a 0-based position.
Confirmed with a live server: the detail link carries hx-get/href to
/source, that route returns 200 for REQ-001, and the scroll target lands
on the artifact's line. Full serve_integration suite plus
cargo clippy --all-targets -- -D warnings and cargo fmt --check all green.
Implements: REQ-243
Verifies: REQ-243
Refs: FEAT-0011 parent f2329f0 commit f7a44a7
3 files changed
Lines changed: 62 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7623 | 7623 | | |
7624 | 7624 | | |
7625 | 7625 | | |
7626 | | - | |
| 7626 | + | |
7627 | 7627 | | |
7628 | 7628 | | |
7629 | 7629 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
533 | 533 | | |
534 | 534 | | |
535 | 535 | | |
536 | | - | |
537 | | - | |
538 | | - | |
539 | | - | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
540 | 548 | | |
541 | 549 | | |
542 | 550 | | |
543 | 551 | | |
544 | 552 | | |
| 553 | + | |
545 | 554 | | |
546 | 555 | | |
547 | 556 | | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
548 | 565 | | |
549 | 566 | | |
550 | | - | |
551 | | - | |
552 | | - | |
553 | | - | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
554 | 571 | | |
555 | 572 | | |
556 | 573 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
807 | 807 | | |
808 | 808 | | |
809 | 809 | | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
810 | 846 | | |
811 | 847 | | |
812 | 848 | | |
| |||
0 commit comments