removed the 2 from wiki-tui2 and wiki_api2 for compatibiltiy with the…#3
removed the 2 from wiki-tui2 and wiki_api2 for compatibiltiy with the…#3max-gaspers-scott merged 2 commits intomainfrom
Conversation
WalkthroughThe PR renames packages and crates from the "…2" variants to non-"2" names (e.g., wiki-tui2 → wiki-tui, wiki-api2 → wiki-api, wiki-api2-macros → wiki-api-macros), updates Cargo metadata and repository/homepage URLs, adjusts import paths across source files, updates HTTP User-Agent strings, and updates docs and desktop entry references. Changes
Sequence Diagram(s)(omitted — changes are rename/import and metadata updates with no protocol/control-flow modifications) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20-25 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (3)
wiki-api/src/page.rs (1)
385-386: Make User-Agent dynamic and include contact URLHardcoding “0.9.2” risks drift; Wikimedia recommends a contact URL/email. Use env! and centralize.
- .header("User-Agent", "wiki-tui/0.9.2") + .header( + "User-Agent", + concat!("wiki-tui/", env!("CARGO_PKG_VERSION"), " (+https://github.com/Builditluc/wiki-tui)") + )wiki-tui.desktop (1)
2-2: Desktop entry aligned; add trailing semicolon to CategoriesRename fields look correct. Minor spec nit: Categories typically end with a semicolon.
-Categories=Network +Categories=Network;Also applies to: 4-5, 8-8
wiki-api/src/search.rs (1)
815-821: Avoid the newline in the missing-field error.
Line 818 currently inserts a newline before “in the result”, so the error prints on two lines with a leading space, which makes logs harder to scan. Please keep the message on a single line.- "couldn't find '{}' - in the result", + "couldn't find '{}' in the result",
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (24)
Cargo.toml(3 hunks)README.md(1 hunks)docs/docs/getting-started/installation.md(1 hunks)src/action.rs(1 hunks)src/app.rs(1 hunks)src/cli.rs(2 hunks)src/components/page.rs(1 hunks)src/components/page_language_popup.rs(1 hunks)src/components/page_viewer.rs(9 hunks)src/components/search.rs(1 hunks)src/components/search_language_popup.rs(1 hunks)src/config.rs(1 hunks)src/main.rs(1 hunks)src/page_loader.rs(1 hunks)src/renderer/default_renderer.rs(1 hunks)src/renderer/mod.rs(1 hunks)src/renderer/test_renderer.rs(1 hunks)wiki-api-macros/Cargo.toml(1 hunks)wiki-api-macros/README.md(1 hunks)wiki-api/Cargo.toml(2 hunks)wiki-api/src/languages.rs(1 hunks)wiki-api/src/page.rs(1 hunks)wiki-api/src/search.rs(2 hunks)wiki-tui.desktop(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (4)
src/config.rs (1)
wiki-api/src/search.rs (1)
search(701-858)
wiki-api/src/languages.rs (1)
wiki-api-macros/src/lib.rs (1)
parse_languages(37-165)
src/cli.rs (1)
wiki-api/src/page.rs (2)
page(307-317)from_path(129-152)
src/components/page_viewer.rs (2)
wiki-api/src/page.rs (3)
page(307-317)language(347-357)builder(154-156)src/components/page.rs (1)
new(100-120)
🔇 Additional comments (18)
wiki-api-macros/README.md (1)
1-1: Rename looks goodHeader matches the new crate name.
wiki-api/src/languages.rs (1)
1-1: Correct macro path after crate renameImport now targets wiki_api_macros; consistent with the manifest.
README.md (1)
31-31: No action requiredThe crate
wiki-tuiis published on crates.io (v0.9.1) and thecargo install wiki-tuicommand is correct and installable.docs/docs/getting-started/installation.md (1)
67-71: Documentation update verified and correct.The cargo install command properly uses
wiki-tui(lines 68-69), and the scan found no stale references in the codebase or documentation—only expected Git metadata entries. All changes are in order.src/renderer/test_renderer.rs (1)
2-2: LGTM! Import path updated correctly.The import change aligns with the repository-wide crate renaming.
src/app.rs (1)
31-31: LGTM! Import path updated correctly.The Link import now correctly references
wiki_apiinstead ofwiki_api2.src/components/search_language_popup.rs (1)
10-10: LGTM! Import path updated correctly.The Language and LANGUAGES imports now correctly reference
wiki_api.src/main.rs (1)
6-6: LGTM! Main crate import updated correctly.The crate name change from
wiki_tui2towiki_tuialigns with the PR objective for improved compatibility.src/components/page_language_popup.rs (1)
10-10: LGTM! Import path updated correctly.The LanguageLink import now correctly references
wiki_api.src/page_loader.rs (1)
5-10: LGTM! Import paths updated correctly.The wiki_api imports for all page loading functionality are now correctly updated.
src/components/search.rs (1)
13-17: LGTM! Import paths updated correctly.The wiki_api imports for search functionality are now correctly updated.
src/cli.rs (1)
7-7: Verification complete—all imports correctly updated, no remaining wiki_api2 references.The changes to src/cli.rs have been verified:
- Line 7:
use wiki_api::languages::Language;✓- Line 108:
wiki_api::page::Page::from_path(...)✓The codebase contains zero remaining
wiki_api2references, and the workspace dependency is properly configured withwiki-apias a local path member.src/renderer/default_renderer.rs (1)
4-7: LGTM! Import path correctly updated.The import path change from
wiki_api2towiki_apiis correct and aligns with the PR objectives to rename the dependency.src/action.rs (1)
4-9: LGTM! Import path correctly updated.The import path change from
wiki_api2towiki_apiis correct and aligns with the PR objectives to rename the dependency.src/components/page_viewer.rs (3)
20-23: LGTM! Import path correctly updated.The import path change from
wiki_api2towiki_apiis correct and aligns with the PR objectives to rename the dependency.
280-280: LGTM! Direct usage correctly updated.The fully-qualified path
wiki_api::page::Page::builder()is correctly updated fromwiki_api2towiki_api.
91-94: LGTM! Formatting improvements enhance readability.The multi-line formatting changes improve code readability without altering any logic or behavior.
Also applies to: 122-126, 133-137, 155-158, 171-174, 189-190, 198-199, 270-274, 298-300, 303-304, 306-309
src/config.rs (1)
13-13: LGTM! Import path correctly updated.The import path change from
wiki_api2towiki_apiis correct and aligns with the PR objectives to rename the dependency.
| name = "wiki-api" | ||
| version = "0.1.2" # Updated version for the fork with new name |
There was a problem hiding this comment.
🧩 Analysis chain
Fix manifest inconsistencies (version and URLs)
- Version went backwards (0.1.3 → 0.1.2). If publishing, bump forward (e.g., 0.1.4).
- homepage/repository point to github.com/mgs/wiki-tui, while README/docs reference Builditluc. Pick one canonical URL and make it consistent.
- Path + version for wiki-api-macros is fine for workspace use; remove
pathbefore publishing to crates.io.
Also applies to: 8-9, 15-15, 32-34
🏁 Script executed:
#!/bin/bash
# Show all repo URLs mentioned across the tree for consistency
rg -nP '(github\.com/[^/\s]+/wiki-tui)' -S -C2
# Confirm no remaining wiki-api2/wiki_tui2 names in manifests
rg -n 'wiki[-_]?api2|wiki[-_]?tui2' --glob '!**/target/**' -SLength of output: 43907
Fix repository URL inconsistency between Cargo manifests and documentation
The manifests now reference github.com/mgs/wiki-tui, but README, docs, and changelog still reference github.com/Builditluc/wiki-tui. This creates broken badge URLs, incorrect issue links, and contributor attribution confusion. Pick one canonical repository URL and update all references consistently (Cargo.toml files at root, wiki-api/, wiki-api-macros/; README.md; docs/mkdocs.yml; docs/docs/ files; and docs/docs/changelog/index.md).
Also verify:
- Version downgrade from 0.1.3 → 0.1.2 (bump forward before publishing if this is an official release).
- Remove
pathdependency from wiki-api-macros before publishing to crates.io.
🤖 Prompt for AI Agents
In wiki-api/Cargo.toml around lines 2 to 3, the project metadata references a
different repository than many docs and manifests; choose one canonical
repository URL (either github.com/mgs/wiki-tui or
github.com/Builditluc/wiki-tui) and update all occurrences to that URL across
the repo: root Cargo.toml, wiki-api/Cargo.toml, wiki-api-macros/Cargo.toml,
README.md, docs/mkdocs.yml, all files under docs/docs/, and
docs/docs/changelog/index.md; also confirm the version should be 0.1.3 (bump
0.1.2 → 0.1.3 if releasing) and remove any local path dependency from
wiki-api-macros before publishing to crates.io (replace path dependency with
published crate reference or feature-gated local path only for development).
There was a problem hiding this comment.
Actionable comments posted: 0
♻️ Duplicate comments (1)
wiki-api/Cargo.toml (1)
2-3:⚠️ Version downgrade—confirm intentionality and document rationale.The package version dropped from 0.1.3 to 0.1.2 during the rename. Per semantic versioning, this should normally be bumped forward (e.g., to 0.1.4) to reflect a breaking change or structural refactor. If this is intentional (e.g., snapshot/pre-release semantics), please document the reasoning; if releasing to crates.io, consider bumping to 0.1.4 or higher.
Likewise, the wiki-api-macros dependency version dropped from 0.1.4 to 0.1.3 (line 34).
This was flagged in a previous review; confirm whether the downgrade is intentional and document the versioning strategy going forward.
🧹 Nitpick comments (1)
wiki-api/Cargo.toml (1)
32-34: Path dependency: acceptable for workspace, but must be removed before publishing to crates.io.The wiki-api-macros dependency uses a local path (
../wiki-api-macros). This is appropriate for workspace development; however, before publishing this crate to crates.io, replace the path reference with a published crate version or feature-gate the path dependency for development-only use (e.g., using a feature flag or a separate[dev-dependencies]section).
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
Cargo.toml(3 hunks)wiki-api-macros/Cargo.toml(1 hunks)wiki-api/Cargo.toml(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- wiki-api-macros/Cargo.toml
- Cargo.toml
🔇 Additional comments (2)
wiki-api/Cargo.toml (2)
8-9: ✓ URLs now align with canonical repository.The homepage and repository fields are now consistently pointing to
github.com/builditluc/wiki-tui. Ensure that documentation, README.md, and other manifest files (root Cargo.toml, wiki-api-macros/Cargo.toml) are also updated to use this same canonical URL to avoid broken links and inconsistent attribution.
15-15: Minor formatting adjustment noted.The bitflags dependency line has been reformatted with inline feature syntax; no functional change.
Changes made:
Summary by CodeRabbit