Add edit mode for data sets/members: e to edit, explicit save only (ctrl+s)#25
Merged
Conversation
This was referenced Jul 19, 2026
Tannex
force-pushed
the
issue-16-dataset-favorites
branch
from
July 19, 2026 10:05
eb9a420 to
fd44fae
Compare
Tannex
force-pushed
the
issue-17-edit-mode
branch
2 times, most recently
from
July 19, 2026 10:09
42b1a4d to
8591b6a
Compare
6 tasks
Tannex
force-pushed
the
issue-16-dataset-favorites
branch
from
July 19, 2026 11:28
1e5213f to
8c8cba3
Compare
Press e on a PS data set or PDS member to open its text content in a full-area textarea editor; enter keeps its browse behavior. Nothing is ever written implicitly: ctrl+s is the only write path, validating each line against the data set LRECL before sending an If-Match conditional PUT through a new opt-in zosmf.TextEditor surface (the read-only Browser interface is unchanged). Conflicts surface in the status line with the buffer intact and ctrl+r as an explicit reload. Dirty exits require a confirmation; --read-only disables edit mode entirely. Demo mode supports the full flow in memory, including ETag conflicts. Closes #17 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Tannex
force-pushed
the
issue-17-edit-mode
branch
from
July 19, 2026 11:30
8591b6a to
67c351c
Compare
Base automatically changed from
issue-16-dataset-favorites
to
issue-15-dsn-copybook-mappings
July 19, 2026 12:18
Owner
Author
|
Edit mode does not seem to map encoding very well, ÆØÅ renders fine in view, but not in edit. |
Owner
Author
|
Always reserve 5 characters for line number |
Owner
Author
|
Holding arrow down in edit mode will keep scrolling for a bit after it is released |
Owner
Author
|
Get rid of explicit ctrl+c binding in edit mode. |
- Decode text-mode payloads from ISO 8859-1 (the z/OSMF wire encoding) into UTF-8 on fetch and encode back on save, so ÆØÅ round-trips in the editor exactly as it renders in the browse view. LRECL validation now measures encoded host bytes, not UTF-8 bytes, and unmappable runes are rejected with their line number. - Reserve a fixed five-column line-number gutter (MaxHeight=99999 also sizes the textarea's wrap cache; files past that line count were already impractical to edit). - Fix scroll inertia when holding an arrow key: the textarea re-renders its whole buffer per update (~19ms/keypress at 1000 lines, profiled), slower than terminal key repeat, so events queued and kept scrolling after release. Repeat-prone navigation keys are now coalesced and applied in one batch per 12ms tick, costing a single re-render. - Remove the explicit ctrl+c quit binding inside the editor; esc (with the dirty confirm) is the way out, quitting stays on the list screens. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #17. Stacked on #24 (
issue-16-dataset-favorites); merge that first — this PR's own changes are the last commit.What
internal/zosmf: new opt-inTextEditorinterface (ReadText/WriteText) implemented byClientandLazyClient.ReadTextrequestsX-IBM-Return-Etagand captures the ETag;WriteTextsends a text-modePUTwithIf-Matchso a host-side change fails the save (IsConflictdetects HTTP 412). The read-onlyBrowserinterface is deliberately unchanged — cqt type-asserts for the write surface and degrades gracefully.internal/cqt:eon a PS data set (dataset list) or PDS member (member list) fetches text and opens a full-area textarea editor withEDIT <target>chrome and aMODIFIEDindicator;enterbehavior is unchanged. RECFMU(load libraries) and unsupported DSORGs get a status message instead of an editor.ctrl+sis the only write path: it validates every line against LRECL (minus the RDW for V formats) and rejects the save naming the offending line. Conflicts keep the buffer and offerctrl+r(explicit reload).escon a dirty buffer asks for confirmation (ddiscards,esc/any key keeps editing); clean exit is immediate. Inside the editorqtypes into the buffer;ctrl+cstill quits.cmd/cqt:--read-onlyflag disableseentirely; demo mode implements the full edit/save/conflict flow in memory (shared across demo profiles).stty -ixonnote for terminals that reserve ctrl+s).Decisions on the issue's open questions
efrom the records view: out of scope for v1 — lists only.ctrl+svs XOFF: keptctrl+s; documentedstty -ixonin the README.FetchTextread path); the buffer round-trips byte-identically with a single trailing newline normalized.If-Matchrather than blocking editing.Validation
go build ./... && go vet ./... && go test ./...all pass. New tests: 6 ininternal/zosmf(conditional GET/PUT headers, ETag round-trip, 412 conflict detection, target normalization) and 9 ininternal/cqt(open/eligibility, dirty tracking, save gating, LRECL rejection, conflict + reload, discard confirmation, key routing,--read-only, missing write surface), plus demo round-trip/conflict tests incmd/cqt.🤖 Generated with Claude Code
Review follow-up