Add data set favorites: f to toggle, favorites popup with notes, wildcard favorites#24
Merged
Tannex merged 2 commits intoJul 19, 2026
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
Owner
Author
|
Follow-up: the shared pattern dialect now also accepts |
5 tasks
f on the data set list toggles the selected data set as an exact favorite; rows covered by an exact or wildcard favorite show a star column. F opens a composited favorites popup (most-recently-used order) with jump-to (favorite becomes the prefix filter), inline note editing, and removal. Favorites persist in cq/favorites.json through a new internal/favorites store that mirrors the dsnmap state-file behavior and reuses its shared wildcard dialect (* any run, % one char): missing file is empty, corrupt file degrades read-only, unknown fields survive. Closes #16 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Favorites reuse the dsnmap pattern dialect, so /…/ regex favorites are now normalized case-preservingly (upper-casing corrupted classes like \d), treated as pattern entries for row marking, and skipped with a diagnostic when they fail to compile. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Tannex
force-pushed
the
issue-16-dataset-favorites
branch
from
July 19, 2026 11:28
1e5213f to
8c8cba3
Compare
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.
Implements #16. Stacked on PR #23 (
issue-15-dsn-copybook-mappings) — merge that first; this PR reuses itsinternal/dsnmapwildcard matcher and state-file conventions.What's here
internal/favorites: JSON state store at<config>/cq/favorites.json(pattern, optional note, created/lastUsed). Same graceful degradation asdsnmap: missing file = empty store, corrupt file = read-only (never overwritten), unknown JSON fields tolerated. Wildcards use the shared cq dialect viadsnmap.MatchPattern(*any run,%exactly one char) — no new dialect.fon the data set list toggles the selected data set as an exact favorite. A dedicated 1-char star column (★) marks rows that are favorited exactly or covered by a wildcard favorite;fon a wildcard-covered row favorites the exact DSN and never mutates the wildcard entry (status notes when a removed exact entry is still wildcard-covered).Fopens the favorites popup, composited over the live view with the same lipgloss Canvas/Layer mechanism and tiny-terminal full-area fallback as the help popup. Entries list in most-recently-used order with notes;enterjumps (the favorite pattern becomes the data set prefix filter and fetches — exact favorites list/select that one data set),nedits the note inline (single-line input;entersaves,esccancels),xremoves,esc/Fcloses.cmd/cqtwiresfavorites.DefaultStore(demo mode included, matching how Persist DSN → copybook mappings (JSON state, wildcard DSN patterns, dialog integration) #15 wires the mapping store).Decisions on the issue's open questions
F, data set screen only (favorites act on the data set list, so that is where the popup lives).Touches the entry), lexicographic tie-break.dsn-copybooks.json); per-profile scoping can be layered on later if profile collisions bite in practice.Tests
internal/favorites: toggle add/remove, wildcard match without mutation, persistence round-trip incl. unknown fields, MRU ordering, corrupt-file read-only degradation, missing file, note validation.internal/cqt: toggle + star marker, wildcard marking with exact-DSN toggle, popup jump (prefix + fetch + touch), navigation/remove/clamping, note editing (keys route to the input while editing), nil-store degradation, empty-popup state.go build ./... && go vet ./... && go test ./...all pass; existing suite untouched.Closes #16
🤖 Generated with Claude Code