@youtyan/code-viewer 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -193,26 +193,36 @@ Services whose names collide across subdirectories are kept distinct via
193
193
  `docker:<service>@<relDir>` ids (cwd-direct compose files keep the historical
194
194
  `docker:<service>` id for backward compatibility).
195
195
 
196
- **Redis** support is read-only: browse DB 0–15, SCAN keys, and view values per
197
- type (string/hash/list as dedicated panes, set/zset/stream as JSON views). It
198
- also participates in snapshots and diffs.
196
+ **Redis** support: browse DB 0–15, SCAN keys, and view values per
197
+ type (string/hash/list as dedicated panes, set/zset/stream as JSON views).
198
+ Edit values, delete keys, and create new keys (string/hash/list/set/zset/stream)
199
+ with confirmation dialogs. It also participates in snapshots and diffs.
199
200
 
200
- **Elasticsearch** support is read-only: list indices, view mappings, paginate
201
+ **Elasticsearch** support: list indices, view mappings, paginate
201
202
  docs with `search_after`, run lucene `q=` searches, and submit DSL queries to a
202
203
  small allowlist of `_search` / `_count` / `_msearch` / `_explain` /
203
- `_validate` / `_field_caps` / `_eql`. Snapshots and diffs over `_search`
204
- iteration are supported.
204
+ `_validate` / `_field_caps` / `_eql`. Edit documents (with optimistic
205
+ concurrency via `_seq_no` / `_primary_term`), create new documents, and delete
206
+ existing ones. Snapshots and diffs over `_search` iteration are supported.
205
207
 
206
- **S3-compatible object storage** (MinIO, LocalStack) is read-only: browse
208
+ **S3-compatible object storage** (MinIO, LocalStack): browse
207
209
  buckets as a folder tree, search by prefix or filename, sort scanned objects by
208
210
  update time, and preview images, video, audio, PDFs, Markdown, HTML, and text
209
- files. Updated-time sorting is scoped to the objects scanned for the current
210
- prefix/search rather than a persistent whole-bucket index. HTML previews are
211
- rendered in a sandboxed `srcdoc` iframe; relative subresources inside the HTML
212
- are not rewritten. **LocalStack** falls back to `docker exec <container> curl`
213
- against the container-local endpoint when the service does not publish a host
214
- port; **MinIO** requires a published host port (add a `9000:9000` mapping) and
215
- will refuse to browse otherwise.
211
+ files. Edit text/markdown/JSON object bodies inline, upload new objects to any
212
+ prefix, and delete existing objects. Updated-time sorting is scoped to the
213
+ objects scanned for the current prefix/search rather than a persistent
214
+ whole-bucket index. HTML previews are rendered in a sandboxed `srcdoc` iframe;
215
+ relative subresources inside the HTML are not rewritten. **LocalStack** falls
216
+ back to `docker exec <container> curl` against the container-local endpoint
217
+ when the service does not publish a host port; **MinIO** requires a published
218
+ host port (add a `9000:9000` mapping) and will refuse to browse otherwise.
219
+
220
+ **SQL row editing** (SQLite / PostgreSQL / MySQL): toggle an Edit mode on the
221
+ table grid to insert, update, or delete rows inline. Edits queue as pending
222
+ changes (shown with a yellow highlight on the affected row/cell) and are
223
+ applied as a single transaction on commit. Row updates and deletes require the
224
+ table to have a primary key. The whole batch rolls back on the first
225
+ constraint violation.
216
226
 
217
227
  ### Browser UI
218
228
 
@@ -226,11 +236,19 @@ Open Datastores in the global navigation to access:
226
236
  the database.
227
237
  - **Table browser** — paginated data grid with column sort, text filter, cell
228
238
  copy, and CSV/JSON export (capped at 100,000 rows; export respects current
229
- filter/sort).
239
+ filter/sort). Double-click a cell to edit inline when Edit mode is on; the
240
+ whole pending edit batch commits atomically.
230
241
  - **Detail footer and related panel** — click any cell to open a resizable
231
242
  detail footer; foreign-key cells open a related panel showing the
232
243
  referenced or referencing rows, with multi-step drill-down breadcrumbs.
233
244
  Cells that match the focused row are highlighted in both panels.
245
+ - **Footer dock with Query History & Session log** — JetBrains-style bottom
246
+ dock that hosts two tabs: the per-database **Query History** (master/detail
247
+ list of saved queries, SSE-synced across tabs) and a **Session log** that
248
+ records every SQL the server runs in this browser session (read fetches,
249
+ user queries, and write commits) with timing, row counts, and the actual
250
+ executed SQL syntax-highlighted with shiki. Auto-follow keeps the newest
251
+ entry pinned; scroll up to pause.
234
252
  - **Rails FK inference toggle** — opt-in heuristic that adds virtual foreign
235
253
  keys following Rails naming conventions (e.g. `user_id → users.id`) on top
236
254
  of the database-declared FKs.
@@ -251,9 +269,11 @@ Open Datastores in the global navigation to access:
251
269
  (or Redis key spaces, or Elasticsearch indices) and compare any two
252
270
  snapshots to see inserted, updated, and deleted rows with full before/after
253
271
  values.
254
- - **Datastore explorers** — first-class sidebars for Redis (DB / SCAN),
272
+ - **Datastore explorers** — first-class sidebars for Redis (DB / SCAN),
255
273
  Elasticsearch (indices / mappings / docs), and S3 (folder tree, kind
256
- badges) so the same Multi-DB tab UI works for non-SQL stores too.
274
+ badges) so the same Multi-DB tab UI works for non-SQL stores too. Each
275
+ explorer supports value editing / document creation / object upload /
276
+ deletion via in-line panes and confirmation dialogs.
257
277
 
258
278
  ### CLI
259
279