Skip to content

removed the 2 from wiki-tui2 and wiki_api2 for compatibiltiy with the…#3

Merged
max-gaspers-scott merged 2 commits intomainfrom
remove_the_2
Nov 12, 2025
Merged

removed the 2 from wiki-tui2 and wiki_api2 for compatibiltiy with the…#3
max-gaspers-scott merged 2 commits intomainfrom
remove_the_2

Conversation

@max-gaspers-scott
Copy link
Owner

@max-gaspers-scott max-gaspers-scott commented Nov 12, 2025

Changes made:

  • Updated Cargo.toml dependency declaration from wiki-api2 to wiki-api
  • Fixed import statements to use wiki_api instead of wiki_api2
  • Corrected application module import in src/main.rs from wiki_tui2 to wiki_tui
  • Updated CLI usage from wiki_api2 to wiki_api
  • Fixed remaining references in documentation and configuration files

Summary by CodeRabbit

  • Chores
    • Project renamed from wiki-tui2 to wiki-tui across the codebase, docs, and packaging.
    • Installation instructions and README simplified to reference wiki-tui.
    • Desktop entry updated to use the new executable/name and icon.
    • Dependency declarations and package metadata reorganized/renamed for consistency.

@coderabbitai
Copy link

coderabbitai bot commented Nov 12, 2025

Walkthrough

The 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

Cohort / File(s) Summary
Package & manifest updates
Cargo.toml, wiki-api/Cargo.toml, wiki-api-macros/Cargo.toml
Rename packages and crate names (remove trailing "2"), update homepage/repository/docs URLs, adjust some versions (wiki-api, wiki-api-macros) and reformat dependency feature lists.
Top-level README & docs
README.md, docs/docs/getting-started/installation.md, wiki-api-macros/README.md
Replace install and docs references from wiki-tui2 to wiki-tui; simplify installation instructions and update README headings.
Desktop entry
wiki-tui.desktop
Update Name, TryExec, Exec, and Icon from wiki-tui2 to wiki-tui.
Source import updates
src/...
src/action.rs, src/app.rs, src/cli.rs, src/config.rs, src/main.rs, src/page_loader.rs, src/components/page.rs, src/components/page_language_popup.rs, src/components/page_viewer.rs, src/components/search.rs, src/components/search_language_popup.rs, src/renderer/default_renderer.rs, src/renderer/mod.rs, src/renderer/test_renderer.rs
Change import paths to new crate names (e.g., wiki_api2::...wiki_api::..., wiki_tui2::...wiki_tui::...) and minor formatting/debug-string adjustments; no behavioral logic changes.
wiki-api code updates
wiki-api/src/page.rs, wiki-api/src/search.rs, wiki-api/src/languages.rs
Update User-Agent header strings (wiki-tui2/0.9.2wiki-tui/0.9.2), switch macro import path (wiki_api2_macros::parse_languageswiki_api_macros::parse_languages), and minor error-formatting refactor in search.rs.
Macro crate metadata
wiki-api-macros/Cargo.toml
Rename crate metadata entries to wiki-api-macros, update documentation/homepage/repository URLs.

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

  • Areas to double-check:
    • Consistency of all import path updates from wiki_api2wiki_api and wiki_tui2wiki_tui
    • Version changes/downgrades in wiki-api and wiki-api-macros manifests
    • Consistent User-Agent updates in wiki-api/src/page.rs and wiki-api/src/search.rs
    • Documentation/desktop entry references matching the new executable name

Possibly related PRs

Poem

🐰 From "2" I hopped and left it behind,
wiki-tui now leads with a tidy mind.
Imports rewritten, headers made new,
Small changes stitched through code like dew.
A cheerful hop to a cleaner view! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: removing the '2' suffix from wiki-tui2 and wiki_api2 package names across the codebase.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch remove_the_2

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (3)
wiki-api/src/page.rs (1)

385-386: Make User-Agent dynamic and include contact URL

Hardcoding “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 Categories

Rename 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

📥 Commits

Reviewing files that changed from the base of the PR and between 40fb36e and da3aafd.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is 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 good

Header matches the new crate name.

wiki-api/src/languages.rs (1)

1-1: Correct macro path after crate rename

Import now targets wiki_api_macros; consistent with the manifest.

README.md (1)

31-31: No action required

The crate wiki-tui is published on crates.io (v0.9.1) and the cargo install wiki-tui command 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_api instead of wiki_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_tui2 to wiki_tui aligns 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_api2 references, and the workspace dependency is properly configured with wiki-api as a local path member.

src/renderer/default_renderer.rs (1)

4-7: LGTM! Import path correctly updated.

The import path change from wiki_api2 to wiki_api is 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_api2 to wiki_api is 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_api2 to wiki_api is 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 from wiki_api2 to wiki_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_api2 to wiki_api is correct and aligns with the PR objectives to rename the dependency.

Comment on lines +2 to +3
name = "wiki-api"
version = "0.1.2" # Updated version for the fork with new name
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 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 path before 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/**' -S

Length 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 path dependency 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).

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between da3aafd and 64f98a5.

📒 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.

@max-gaspers-scott max-gaspers-scott merged commit 3ebf335 into main Nov 12, 2025
1 check passed
@max-gaspers-scott max-gaspers-scott deleted the remove_the_2 branch November 12, 2025 16:16
@coderabbitai coderabbitai bot mentioned this pull request Nov 17, 2025
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

Comments