Repository navigation
fix(id/web): classify_tag only treats .archive.{unix-ts} names as archives (#2793) - #2794
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Caution Review failedThe pull request is closed. Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Fixes #2793
classify_tagreturnedFileKind::Archivefor any filename containing.archive., discarding the result of parsing the suffix as a unix timestamp. An ordinary file likenotes.archive.txttherefore rendered with anarchive: ?badge, linked to/hash/{hash}instead of/edit/{name}, sorted after every primary file, and was excluded fromhash_to_primaryparent resolution.This applies the same rule #810 applied to the
auto-prefix in the same function (#809): only a suffix that actually parses counts. No producer mints a non-numeric archive suffix —free_archive_namealways formats au64(fileops.rs).pkgs/id/src/web/routes.rs: archive branch returnsArchiveonly when the suffix parses asu64; otherwise the name falls through toPrimary.test_classify_tag_archive_no_timestamprewritten as the id(web): classify_tag treats any '.archive.' filename as an archive — notes.archive.txt renders with an 'archive: ?' badge, sorts out of the primary list, and links by hash instead of by name #2793 regression test (mirrorstest_classify_tag_auto_prefix_non_date_is_primary):notes.md.archive.notanumber,notes.archive.txt,meeting.archive.notes,backup.archive.draft,x.archive.,photo.archive.2024-01-01are Primary; genuinenotes.md.archive.1711000000coverage is unchanged intest_classify_tag_archive.Verified on the laptop (pinned 1.99 toolchain):
cargo test --features web classify_tag— 8 passed, 0 failed, including the rewritten #2793 regression test.Need help on this PR? Tag
@codesmith-botwith what you need.