Skip to content

Commit a25bd76

Browse files
authored
Dev pr (#24)
* Refactor explorer into stage and ledger modes - redesign the explorer around stage and ledger modes with a shared shell and route-based ledger navigation - add stage and ledger specific content actions, fragment URL support, segmented sorting, and UI polish - update explorer help/docs, bump explorer to 1.1.0, and align the compose/general explorer image tag - add focused tests for sorting, fragment routing, tree behavior, route controls, and content interactions * Unify service header branding and colors
1 parent 9d71ad8 commit a25bd76

32 files changed

Lines changed: 2897 additions & 765 deletions

compose/general/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ services:
1717
- database:/srv/database
1818

1919
explorer:
20-
image: ghcr.io/sandialabs/sync-services/explorer:1.0.2
20+
image: ghcr.io/sandialabs/sync-services/explorer:1.1.0
2121
container_name: explorer
2222
networks:
2323
- docker

services/explorer/README.md

Lines changed: 56 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,98 +1,91 @@
11
# Synchronic Web Explorer
22

3-
A React-based UI for exploring and interacting with synchronic web journals.
3+
React UI for browsing and editing synchronic web journals through the gateway API.
44

5-
## Features
5+
## Current Model
66

7-
- Navigate hierarchical document structures across peer-to-peer networks
8-
- View and edit journal content
9-
- Manage peer connections
10-
- View document history and versions
11-
- Verify cryptographic proofs
7+
The explorer now has two modes:
128

13-
## Development
9+
- `Stage`
10+
- local staged files and directories
11+
- tree-driven selection
12+
- file editing is read-only until `Edit`
13+
- `Ledger`
14+
- committed route-based browsing
15+
- route strip across the top
16+
- file view toggles between content and proof
1417

15-
### Prerequisites
18+
There is no dedicated history pane in the current UI. Ledger history is expressed through the route strip and snapshot controls.
1619

17-
- Node.js 18+
18-
- npm or yarn
20+
## Development
1921

20-
### Setup
22+
Prerequisites:
2123

22-
```bash
23-
npm install
24-
```
24+
- Node.js 18+
25+
- npm
2526

26-
### Run Development Server
27+
Run the dev server:
2728

2829
```bash
30+
REACT_APP_SYNC_EXPLORER_ENDPOINT=http://127.0.0.1:8192/api/v1 \
31+
REACT_APP_SYNC_EXPLORER_PASSWORD=password \
2932
npm start
3033
```
3134

32-
The app will be available at http://localhost:3000
33-
34-
### Run Tests
35+
The app is served from `http://localhost:3000/explorer`.
3536

36-
```bash
37-
npm test
38-
```
39-
40-
### Build for Production
41-
42-
```bash
43-
npm run build
44-
```
37+
## Configuration
4538

46-
### Docker
39+
Development-time defaults are read from:
4740

48-
Build the container:
41+
- `REACT_APP_SYNC_EXPLORER_ENDPOINT`
42+
- `REACT_APP_SYNC_EXPLORER_PASSWORD`
4943

50-
```bash
51-
docker build -t explorer .
52-
```
44+
Container/runtime defaults are read from:
5345

54-
Run the container:
46+
- `SYNC_EXPLORER_ENDPOINT`
47+
- `SYNC_EXPLORER_PASSWORD`
5548

56-
```bash
57-
docker run -p 8080:80 explorer
58-
```
49+
## Usage Notes
5950

60-
## Configuration
51+
### Stage
6152

62-
The explorer connects to a synchronic web gateway endpoint. You'll need:
53+
- The left tree shows local staged content.
54+
- Tree rows expose rename and delete.
55+
- Selecting a directory exposes:
56+
- `+ Document`
57+
- `+ Directory`
58+
- `Upload File`
59+
- Selecting a file exposes:
60+
- `Edit` / `Save`
61+
- `Download`
6362

64-
1. A running journal service (e.g., using the compose/general setup)
65-
2. The gateway endpoint URL (e.g., http://localhost:8192/api/v1)
66-
3. The authentication password
63+
### Ledger
6764

68-
### Environment Variables
65+
- The route strip spans the app above the tree and content pane.
66+
- The leftmost pill synchronizes the latest committed root and shows the current root index.
67+
- The first hop is always the local/root journal.
68+
- Each hop accepts:
69+
- `latest`
70+
- a negative integer snapshot index
71+
- Extending the route opens an inline peer chooser.
72+
- Selecting a file exposes:
73+
- `Proof` / `Content`
74+
- `Pin` / `Unpin`
6975

70-
You can pre-configure the endpoint and password using environment variables:
76+
## Docker
7177

72-
- `SYNC_EXPLORER_ENDPOINT`: Default gateway endpoint URL
73-
- `SYNC_EXPLORER_PASSWORD`: Default authentication password
78+
Build:
7479

75-
#### Development
7680
```bash
77-
REACT_APP_SYNC_EXPLORER_ENDPOINT=http://localhost:8192/api/v1 \
78-
REACT_APP_SYNC_EXPLORER_PASSWORD=mypassword \
79-
npm start
81+
docker build -t explorer .
8082
```
8183

82-
#### Docker
84+
Run:
85+
8386
```bash
8487
docker run -p 8080:80 \
85-
-e SYNC_EXPLORER_ENDPOINT=http://localhost:8192/api/v1 \
86-
-e SYNC_EXPLORER_PASSWORD=mypassword \
88+
-e SYNC_EXPLORER_ENDPOINT=http://127.0.0.1:8192/api/v1 \
89+
-e SYNC_EXPLORER_PASSWORD=password \
8790
explorer
8891
```
89-
90-
## Usage
91-
92-
1. Enter your gateway endpoint and password in the toolbar
93-
2. Click "Synchronize" to connect
94-
3. Navigate through the file tree in the left pane
95-
4. View and edit content in the middle pane
96-
5. Explore document history in the right pane
97-
98-
For more detailed help, click the "Help" button in the toolbar.

services/explorer/ai-spec.md

Lines changed: 0 additions & 207 deletions
This file was deleted.

0 commit comments

Comments
 (0)