Commit 9adf6233
9adf623308f3Merged
Scott Nixon <[email protected]> · 9 months ago · 27 files · +11 added · ~8 modified · -8 deleted
Description
Refactor web interface to embedded Claude Code terminal + document viewer
Replace the 3-route chatbot architecture with a single-page layout:
- Left panel: xterm.js terminal connected to Claude Code via WebSocket PTY bridge
- Right panel: Tabbed PRD/Spec viewer with live markdown rendering via SSE file watcher
- Header: Approve & Execute button triggers decompose -> scaffold -> pipeline chain
Server-side changes:
- server/terminal.rs: WebSocket PTY bridge using portable-pty
- server/documents.rs: notify file watcher on .attractor/ with SSE push
- server/execute.rs: decompose -> scaffold -> pipeline execution chain
- server/stream.rs: SSE pipeline event streaming (retained from prior impl)
Client-side changes:
- components/terminal.rs: xterm.js wrapper calling initTerminal() on mount
- components/document_viewer.rs: Tabbed SSE subscriber with pulldown-cmark rendering
- components/approval_bar.rs: Approve & Execute with phase progress
- components/execution_panel.rs: Pipeline node progress via SSE
- components/layout.rs: CSS grid two-column layout
Removed: pages/ directory, chat_input, custom chatbot (generate.rs, pipeline.rs) Added: portable-pty, notify, pulldown-cmark, xterm.js (CDN), package.json
Details
- Commit
- 9adf623308f3
- Parent
- 4ac446506539
Cargo.lockmodifiedView file
"futures", "gloo-net", "gloo-timers", "js-sys", "lazy_static", "leptos", "leptos_axum", "leptos_config", "leptos_meta", "leptos_router", "notify", "portable-pty", "pulldown-cmark", "serde", "serde_json", "tokio", "tower-http", "tracing", "tracing-subscriber", "urlencoding", "uuid", "wasm-bindgen", "web-sys",][[package]]dependencies = [ "async-trait", "axum-core", "base64", "bytes", "futures-util", "http", "serde_json", "serde_path_to_error", "serde_urlencoded", "sha1", "sync_wrapper", "tokio", "tokio-tungstenite", "tower", "tower-layer", "tower-service",[[package]]name = "bitflags"version = "1.3.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"[[package]]name = "bitflags"version = "2.10.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3"[[package]]name = "block-buffer"version = "0.10.4"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"dependencies = [ "generic-array",][[package]]name = "bstr"version = "1.12.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510"[[package]]name = "byteorder"version = "1.5.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"[[package]]name = "bytes"version = "1.11.1"source = "registry+https://github.com/rust-lang/crates.io-index"[[package]]name = "cfg_aliases"version = "0.1.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e"[[package]]name = "cfg_aliases"version = "0.2.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"[[package]]name = "cpufeatures"version = "0.2.17"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"dependencies = [ "libc",][[package]]name = "crossbeam-utils"version = "0.8.21"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"[[package]]name = "crypto-common"version = "0.1.7"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a"dependencies = [ "generic-array", "typenum",][[package]]name = "dashmap"version = "6.1.0"source = "registry+https://github.com/rust-lang/crates.io-index"][[package]]name = "data-encoding"version = "2.10.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "d7a1e2f27636f116493b8b860f5546edb47c8d8f8ea73e1d2a20be88e28d1fea"[[package]]name = "derive-where"version = "1.6.0"source = "registry+https://github.com/rust-lang/crates.io-index"][[package]]name = "digest"version = "0.10.7"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"dependencies = [ "block-buffer", "crypto-common",][[package]]name = "displaydoc"version = "0.2.5"source = "registry+https://github.com/rust-lang/crates.io-index"][[package]]name = "downcast-rs"version = "1.2.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2"[[package]]name = "drain_filter_polyfill"version = "0.1.3"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be"[[package]]name = "filedescriptor"version = "0.8.3"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "e40758ed24c9b2eeb76c35fb0aebc66c626084edd827e07e1552279814c6682d"dependencies = [ "libc", "thiserror 1.0.69", "winapi",][[package]]name = "filetime"version = "0.2.27"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "f98844151eee8917efc50bd9e8318cb963ae8b297431495d3f758616ea5c57db"dependencies = [ "cfg-if", "libc", "libredox",][[package]]name = "find-msvc-tools"version = "0.1.9"source = "registry+https://github.com/rust-lang/crates.io-index"][[package]]name = "fsevent-sys"version = "4.1.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "76ee7a02da4d231650c7cea31349b889be2f45ddb3ef3032d2ec8185f6313fd2"dependencies = [ "libc",][[package]]name = "futures"version = "0.3.31"source = "registry+https://github.com/rust-lang/crates.io-index"][[package]]name = "generic-array"version = "0.14.7"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"dependencies = [ "typenum", "version_check",][[package]]name = "getopts"version = "0.2.24"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "cfe4fbac503b8d1f88e6676011885f34b7174f46e59956bba534ba83abded4df"dependencies = [ "unicode-width",][[package]]name = "getrandom"version = "0.2.17"source = "registry+https://github.com/rust-lang/crates.io-index"][[package]]name = "inotify"version = "0.10.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "fdd168d97690d0b8c412d6b6c10360277f4d7ee495c5d0d5d5fe0854923255cc"dependencies = [ "bitflags 1.3.2", "inotify-sys", "libc",][[package]]name = "inotify-sys"version = "0.1.5"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "e05c02b5e89bff3b946cedeca278abc628fe811e604f027c45a8aa3cf793d0eb"dependencies = [ "libc",][[package]]name = "instant"version = "0.1.13"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222"dependencies = [ "cfg-if",][[package]]name = "interpolator"version = "0.5.0"source = "registry+https://github.com/rust-lang/crates.io-index"][[package]]name = "kqueue"version = "1.1.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "eac30106d7dce88daf4a3fcb4879ea939476d5074a9b7ddd0fb97fa4bed5596a"dependencies = [ "kqueue-sys", "libc",][[package]]name = "kqueue-sys"version = "1.0.4"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "ed9625ffda8729b85e45cf04090035ac368927b8cebc34898e7c120f52e4838b"dependencies = [ "bitflags 1.3.2", "libc",][[package]]name = "lazy_static"version = "1.5.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "459427e2af2b9c839b132acb702a1c654d95e10f8c326bfc2ad11310e458b1c5"[[package]]name = "libredox"version = "0.1.12"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "3d0b95e02c851351f877147b7deea7b1afb1df71b63aa5f8270716e0c5720616"dependencies = [ "bitflags 2.10.0", "libc", "redox_syscall 0.7.1",][[package]]name = "linear-map"version = "1.2.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc"dependencies = [ "libc", "log", "wasi", "windows-sys 0.61.2",]checksum = "60993920e071b0c9b66f14e2b32740a4e27ffc82854dcd72035887f336a09a28"[[package]]name = "nix"version = "0.28.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4"dependencies = [ "bitflags 2.10.0", "cfg-if", "cfg_aliases 0.1.1", "libc",][[package]]name = "notify"version = "7.0.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "c533b4c39709f9ba5005d8002048266593c1cfaf3c5f0739d5b8ab0c6c504009"dependencies = [ "bitflags 2.10.0", "filetime", "fsevent-sys", "inotify", "kqueue", "libc", "log", "mio", "notify-types", "walkdir", "windows-sys 0.52.0",][[package]]name = "notify-types"version = "1.0.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "585d3cb5e12e01aed9e8a1f70d5c6b5e86fe2a6e48fc8cd0b3e0b8df6f6eb174"dependencies = [ "instant",][[package]]name = "nu-ansi-term"version = "0.50.3"source = "registry+https://github.com/rust-lang/crates.io-index"dependencies = [ "cfg-if", "libc", "redox_syscall", "redox_syscall 0.5.18", "smallvec", "windows-link",]checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"[[package]]name = "portable-pty"version = "0.9.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "b4a596a2b3d2752d94f51fac2d4a96737b8705dddd311a32b9af47211f08671e"dependencies = [ "anyhow", "bitflags 1.3.2", "downcast-rs", "filedescriptor", "lazy_static", "libc", "log", "nix", "serial2", "shared_library", "shell-words", "winapi", "winreg",][[package]]name = "potential_utf"version = "0.1.4"source = "registry+https://github.com/rust-lang/crates.io-index"][[package]]name = "pulldown-cmark"version = "0.12.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "f86ba2052aebccc42cbbb3ed234b8b13ce76f75c3551a303cb2bcffcff12bb14"dependencies = [ "bitflags 2.10.0", "getopts", "memchr", "pulldown-cmark-escape", "unicase",][[package]]name = "pulldown-cmark-escape"version = "0.11.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "007d8adb5ddab6f8e3f491ac63566a7d5002cc7ed73901f72057943fa71ae1ae"[[package]]name = "quinn"version = "0.11.9"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20"dependencies = [ "bytes", "cfg_aliases", "cfg_aliases 0.2.1", "pin-project-lite", "quinn-proto", "quinn-udp",source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd"dependencies = [ "cfg_aliases", "cfg_aliases 0.2.1", "libc", "once_cell", "socket2",source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d"dependencies = [ "bitflags", "bitflags 2.10.0",][[package]]name = "redox_syscall"version = "0.7.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "35985aa610addc02e24fc232012c86fd11f14111180f902b67e2d5331f8ebf2b"dependencies = [ "bitflags 2.10.0",][[package]]name = "regex"version = "1.12.3"source = "registry+https://github.com/rust-lang/crates.io-index"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34"dependencies = [ "bitflags", "bitflags 2.10.0", "errno", "libc", "linux-raw-sys",][[package]]name = "serial2"version = "0.2.33"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "8cc76fa68e25e771492ca1e3c53d447ef0be3093e05cd3b47f4b712ba10c6f3c"dependencies = [ "cfg-if", "libc", "winapi",][[package]]name = "server_fn"version = "0.7.8"source = "registry+https://github.com/rust-lang/crates.io-index"][[package]]name = "sha1"version = "0.10.6"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba"dependencies = [ "cfg-if", "cpufeatures", "digest",][[package]]name = "sharded-slab"version = "0.1.7"source = "registry+https://github.com/rust-lang/crates.io-index"][[package]]name = "shared_library"version = "0.1.9"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "5a9e7e0f2bfae24d8a5b5a66c5b257a83c7412304311512a0c054cd5e619da11"dependencies = [ "lazy_static", "libc",][[package]]name = "shell-words"version = "1.1.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "dc6fe69c597f9c37bfeeeeeb33da3530379845f10be461a66d16d03eca2ded77"[[package]]name = "shlex"version = "1.3.0"source = "registry+https://github.com/rust-lang/crates.io-index"][[package]]name = "tokio-tungstenite"version = "0.24.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "edc5f74e248dc973e0dbb7b74c7e0d6fcc301c694ff50049504004ef4d0cdcd9"dependencies = [ "futures-util", "log", "tokio", "tungstenite",][[package]]name = "tokio-util"version = "0.7.18"source = "registry+https://github.com/rust-lang/crates.io-index"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8"dependencies = [ "bitflags", "bitflags 2.10.0", "bytes", "futures-core", "futures-util",checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"[[package]]name = "tungstenite"version = "0.24.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "18e5b8366ee7a95b16d32197d0b2604b43a0be89dc5fac9f8e96ccafbaedda8a"dependencies = [ "byteorder", "bytes", "data-encoding", "http", "httparse", "log", "rand 0.8.5", "sha1", "thiserror 1.0.69", "utf-8",][[package]]name = "typed-builder"version = "0.20.1"source = "registry+https://github.com/rust-lang/crates.io-index"][[package]]name = "typenum"version = "1.19.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb"[[package]]name = "unicase"version = "2.9.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493"[[package]]name = "unicode-width"version = "0.2.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254"[[package]]name = "unicode-xid"version = "0.2.6"source = "registry+https://github.com/rust-lang/crates.io-index"][[package]]name = "urlencoding"version = "2.1.3"name = "utf-8"version = "0.7.6"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da"checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"[[package]]name = "utf8-width"][[package]]name = "winapi"version = "0.3.9"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"dependencies = [ "winapi-i686-pc-windows-gnu", "winapi-x86_64-pc-windows-gnu",][[package]]name = "winapi-i686-pc-windows-gnu"version = "0.4.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"[[package]]name = "winapi-util"version = "0.1.11"source = "registry+https://github.com/rust-lang/crates.io-index"][[package]]name = "winapi-x86_64-pc-windows-gnu"version = "0.4.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"[[package]]name = "windows-core"version = "0.62.2"source = "registry+https://github.com/rust-lang/crates.io-index"][[package]]name = "winreg"version = "0.10.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d"dependencies = [ "winapi",][[package]]name = "wit-bindgen"version = "0.51.0"source = "registry+https://github.com/rust-lang/crates.io-index"crates/attractor-web/Cargo.tomlmodifiedView file
Loading diff…
crates/attractor-web/package.jsonaddedView file
Loading diff…
crates/attractor-web/public/js/xterm-setup.jsaddedView file
Loading diff…
crates/attractor-web/src/app.rsmodifiedView file
Loading diff…
crates/attractor-web/src/components/approval_bar.rsaddedView file
Loading diff…
crates/attractor-web/src/components/chat_input.rsdeleted
Loading diff…
crates/attractor-web/src/components/document_viewer.rsaddedView file
Loading diff…
crates/attractor-web/src/components/execution_panel.rsaddedView file
Loading diff…
crates/attractor-web/src/components/layout.rsaddedView file
Loading diff…
crates/attractor-web/src/components/markdown_pane.rsdeleted
Loading diff…
crates/attractor-web/src/components/markdown_render.rsaddedView file
Loading diff…
crates/attractor-web/src/components/mod.rsmodifiedView file
Loading diff…
crates/attractor-web/src/components/terminal.rsaddedView file
Loading diff…
crates/attractor-web/src/lib.rsmodifiedView file
Loading diff…
crates/attractor-web/src/main.rsmodifiedView file
Loading diff…
crates/attractor-web/src/pages/editor.rsdeleted
Loading diff…
crates/attractor-web/src/pages/execution.rsdeleted
Loading diff…
crates/attractor-web/src/pages/mod.rsdeleted
Loading diff…
crates/attractor-web/src/pages/prompt.rsdeleted
Loading diff…
crates/attractor-web/src/server/documents.rsaddedView file
Loading diff…
crates/attractor-web/src/server/execute.rsaddedView file
Loading diff…
crates/attractor-web/src/server/generate.rsdeleted
Loading diff…
crates/attractor-web/src/server/mod.rsmodifiedView file
Loading diff…
crates/attractor-web/src/server/pipeline.rsdeleted
Loading diff…
crates/attractor-web/src/server/terminal.rsaddedView file
Loading diff…
crates/attractor-web/style/main.scssmodifiedView file
Loading diff…