Repository navigation
feat: file saving into .qrate, autosave + Ctrl+S, floating cell editor - #47
Merged
Merged
Conversation
…ndicator Cell edits were held in memory only; nothing wrote them back. Add a whole-table rewrite of dataset_main (in the project's original column order, so the saved column layout stays in sync) triggered by: - a new Autosave setting: timed/buffered (default), immediate, or off - Ctrl+S (global action), and a quit-time flush of pending edits Surface unsaved state as a dot before the project name in the title bar, fed by the dirty tracker via a global observer.
…headers Replace the inline cell editor with a floating one: `deferred` + `anchored` (Local mode) paint the editor above the grid so it overflows the cramped cell, and `snap_to_window` keeps it fully on-screen near any edge. The plain text stays underneath so row height and neighbours are unaffected. While a cell is active (being edited or selected), highlight its row number and column header (Google-Sheets style). Both are already sticky — the `#` column is fixed_left and the header row pins to the top — so the highlight stays put as the grid scrolls under it.
devnull03
force-pushed
the
feat/file-saving-and-editor
branch
from
July 20, 2026 12:40
4696196 to
5ac7b42
Compare
…safe Long values now wrap and grow the box downward (`auto_grow`, Enter commits / Shift+Enter newlines) instead of scrolling sideways, capped to the table's measured width. A new `clamped_float` element floats the editor like `anchored(Local)` but confines it to the table rect (gpui only clamps to the window), so it can't spill over a side panel, and `.occlude()` stops clicks falling through to the grid behind it.
devnull03
marked this pull request as ready for review
July 20, 2026 16:21
gpui's `img` stamps the element with the image's own aspect ratio, so a `size_full` img ignored the frame shape and `object_fit(Contain)` had nothing to letterbox. Size it by its intrinsic ratio under `max_w/h_full` inside a centered wrapper so it fits with bars, and render square corners.
Drag the bottom-right grip to resize the floating editor; the chosen width/height persist in user-scope settings and are clamped to sane minimums and the table bounds. The drag captures the start mouse position and box size so each move applies the delta from the start.
Autosave becomes a switch plus a method dropdown (shown only while on), both editing the one AUTOSAVE_KEY the table reads. Column filters become a master switch gating a multi-select picker whose selection is the set of filter-enabled columns; the picker mirrors gpui-component's menu-item styling and its trigger shows "First +N others". The Settings window now observes the settings globals so these scope-dependent rows rebuild live. The table gates every filter dropdown behind the master switch.
Add File > Save (wired to the existing Save action / Ctrl+S). The title-bar unsaved dot now tracks only PROJECT_DATA instead of any dirty domain, so auto-persisted column layout/settings no longer light it forever. Closing the window with unsaved cell edits prompts Save / Don't Save / Cancel; Don't Save clears the mark so the quit flush discards it.
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.
Summary
Two related chunks, one per commit.
1. Persist cell edits to
.qrate(ac23747)Cell edits were held in memory only — nothing wrote them back. Added a whole-table rewrite of
dataset_main, in one transaction (crash-safe), written in the project's original column order so it stays in sync with the separately-saved column layout. Triggered by:timed/buffered (default),immediate, oroffUnsaved state now shows as a dot before the project name in the title bar, driven by the dirty tracker via a global observer.
2. Floating cell editor + sticky highlighted headers (
4696196)Replaced the inline editor with a floating one:
deferred+anchored(Local) paint it above the grid so it overflows the cramped cell, andsnap_to_windowkeeps it on-screen near any edge. While a cell is active, its row number and column header highlight (Google-Sheets style) — both were already sticky (fixed_left#column, pinned header row), so the highlight stays put while scrolling.Verification
cargo fmt --all --check— passcargo clippy -p settings -p table -p window-wrapper -p app --all-targets -- -D warnings -A dead_code— passcargo test -p settings -p table— pass (incl. newsave_dataset_rewrites_rows_and_round_trips,snapshot_order_follows_ckey_not_display_order)cargo test --workspacenot run to completion locally — draft; worth confirming in CI.Notes / follow-ups
timed); seeding a visible default was deferred.