Skip to content

Add independent filename-based project revisions - #137

Open
Myuavbug66 wants to merge 1 commit into
CNCKitchen:mainfrom
Myuavbug66:pr/project-save-revisions
Open

Myuavbug66 wants to merge 1 commit into
CNCKitchen:mainfrom
Myuavbug66:pr/project-save-revisions

Conversation

@Myuavbug66

@Myuavbug66 Myuavbug66 commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Keep recognizable project revisions

Save suggests Part-001.scanruler, Part-002.scanruler and later revisions
instead of repeating the same suggested filename. Opening Part-9.scanruler
continues with Part-010.scanruler; numbering expands naturally beyond 999.

Filename-based, not folder-based: numbering follows the opened file or last
successfully dispatched save in this session. It does not scan a directory for
higher revisions. Browser download settings still control save locations,
cancellation, overwrite prompts and any manually changed filename. ScanRuler
cannot observe those download-dialog changes; reopen the saved file to continue
from its actual name.

Hosted support: works in the normal hosted app after merge/deployment. No
local server, helper or folder permission is required. This branch starts
directly from upstream and does not depend on the separate Save As location
contribution, PR #136.

Usage

  • Name a new project and click Save: its suggestion ends in -001.
  • Save again: the next suggestion increments.
  • Open a numbered project: continue from that file's revision.
  • Rename the project: start a new sequence under the new title.

Existing files are not renamed. The portable .scanruler format, original scans
and alignment are unchanged. Agent commands returning project bytes retain
their existing unnumbered names.

Implementation and validation
  • Small pure filename helpers support padded/unpadded names, manually named
    opened files, case-insensitive revision matching and safe-integer checks.
  • Filename history advances only after successful download dispatch. Packing or
    dispatch failures do not advance it or mark unsaved changes saved.
  • New project resets the history. Recovery uses the project title, not a
    synthetic recovery filename.
  • No location controls, directory enumeration, Save As helper or export changes.
  • The two contributions both touch the project save hook and may need ordinary
    merge reconciliation if integrated together; neither requires the other's
    branch or feature.

Validation on this independent upstream-based worktree:

  • 38 focused unit tests passed (revisions, project and project schema).
  • Production build, plugin boundary, units, whitespace and runner syntax passed.
  • 95 browser assertions passed: production revisions (12), production smoke (9),
    history (24), recovery (23), imports (18) and CAD undo (9).
  • Revision browser checks use only public UI/static assets and intercepted
    downloads, with no source-module or local-writer requests.
  • Recovery's two opening workspace switches now use public UI clicks instead
    of dynamic-import setters that repeatedly encountered Chrome's
    Promise was collected protocol failure. Assertions remain unchanged.

Downloads are intercepted during tests. Native OS dialogs, disk completion,
manual download renames/cancellations and full unit/MCP/end-to-end suites were
not recertified. Dispatch success is not proof of completion on disk.

Suggest padded revision names from opened or last dispatched project filenames without folder access or save-location dependencies.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Myuavbug66

Copy link
Copy Markdown
Contributor Author

I realized this branch is not for everybody. In fact I'm sure some people will absolutely hate this idea. But I'm a revision freak. It's not if or when will you make a mistake But how do you recover from it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant