Skip to content

Conversation

@TobiTenno
Copy link
Member

@TobiTenno TobiTenno commented Dec 30, 2025

What did you fix?

fixes build issue on docs


Reproduction steps


Evidence/screenshot/link to line

Considerations

  • Does this contain a new dependency? [No]
  • Does this introduce opinionated data formatting or manual data entry? [No]
  • Does this pr include updated data files in a separate commit that can be reverted for a clean code-only pr? [Yes]
  • Have I run the linter? [Yes]
  • Is is a bug fix, feature request, or enhancement? [Docs]

Summary by CodeRabbit

  • Bug Fixes

    • Corrected a misspelling in mission difficulty data and improved mission parsing to prevent missing/invalid fields causing issues
    • Made mission "enemy" optional to avoid errors when that info is unavailable
  • Chores

    • Ignore generated docs in version control
    • Added a docs build job and standardized Node/npm install steps in CI workflows

✏️ Tip: You can customize this high-level summary in your review settings.

@TobiTenno TobiTenno requested a review from a team as a code owner December 30, 2025 18:56
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 30, 2025

📝 Walkthrough

Walkthrough

Adds exported Archimedea types and renames diviationdeviation; extends Kuva parsing to include arbitration, archwing/sharkwing flags and safer checks; makes enemy optional; re-adds dist/ and adds docs/ to .gitignore; adds a CI docs job and updates docs workflow to use npm ci.

Changes

Cohort / File(s) Summary
Archimedea models
lib/models/Archimedea.ts
Exported types/interfaces (Difficulty, RawArchimedeaMission, ArchimedeaMissionDifficultyRisk, ArchimedeaMissionDifficulty); renamed public property diviationdeviation; constructor doc and initialization updated.
Kuva parsing
lib/models/Kuva.ts
Parsed result now includes arbitration; per-mission objects typed as ExternalMission; added archwing/sharkwing flags from mission.solnodedata; added optional chaining for mission.missiontype; deduplication preserved.
Supporting types
lib/supporting/ExternalMission.ts
Made enemy optional (enemy?: string).
Workflows / CI
.github/workflows/ci.yaml, .github/workflows/docs.yaml
Added docs job to CI (runs after lint, checks out, sets up Node via .nvmrc, runs npm ci, builds docs); docs workflow switched to npm ci and added Node setup step.
Repository config
.gitignore
Re-added dist/ to ignore and added docs/ to ignored paths.

Sequence Diagram(s)

(omitted — changes are model/type updates, parsing tweaks and CI edits; no new multi-component control flow to visualize)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • Soundofdarkness

Poem

🐰 I hopped through types and nudged a name,
deviation fixed — no more typo shame.
Kuva counts and flags align,
docs now build and CI’s fine,
a little rabbit hops away, all tame.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title 'docs!: typos, types' does not accurately reflect the main changes. The changeset involves significant code modifications including type exports, property renames (diviation→deviation), interface exports, and CI/workflow updates—not just documentation fixes or typos. Update the title to reflect the primary changes, such as 'chore: export types, fix naming, and update CI docs workflow' or similar, to better represent the actual code modifications beyond documentation.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings

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.

@TobiTenno TobiTenno enabled auto-merge (squash) December 30, 2025 18:56
Copy link
Contributor

@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

🧹 Nitpick comments (1)
lib/models/Kuva.ts (1)

51-63: Consider removing redundant property assignments.

Lines 61-62 explicitly set archwing and sharkwing with defaults, but line 55 already spreads ...mission.solnodedata, which includes these properties. While the explicit assignments work correctly (overriding the spread), they're redundant.

🔎 Proposed simplification

If solnodedata always includes archwing and sharkwing, you can rely on the spread and remove the explicit assignments:

    const p: ExternalMission = {
      id: '',
      activation: new Date(mission.start),
      expiry: new Date(mission.end),
      ...mission.solnodedata,
      node: node(mission.solnode, locale),
      nodeKey: node(mission.solnode, 'en'),
      type: nodeMissionType(mission.solnode, locale),
      typeKey: nodeMissionType(mission.solnode, 'en'),
      expired: false,
-     archwing: mission.solnodedata?.archwing ?? false,
-     sharkwing: mission.solnodedata?.sharkwing ?? false,
    };

However, if solnodedata might not include these fields, keep the explicit assignments to ensure the interface contract is met.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e61101f and 4607065.

📒 Files selected for processing (4)
  • .gitignore
  • lib/models/Archimedea.ts
  • lib/models/Kuva.ts
  • lib/supporting/ExternalMission.ts
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-10-16T02:24:30.860Z
Learnt from: SlayerOrnstein
Repo: WFCD/warframe-worldstate-parser PR: 702
File: lib/models/Archidemea.ts:74-90
Timestamp: 2025-10-16T02:24:30.860Z
Learning: In Warframe's Archimedea/Conquest data structure (lib/models/Archidemea.ts), Digital Extremes duplicates difficulties when adding hard tier risks. The first risk in higher difficulties (e.g., CD_HARD) is always identical to the one in the normal difficulty (CD_NORMAL), so using `slice(1)` to skip the first risk when processing additional difficulties is the correct approach to avoid duplicates.

Applied to files:

  • lib/models/Archimedea.ts
🧬 Code graph analysis (1)
lib/models/Kuva.ts (1)
lib/supporting/ExternalMission.ts (1)
  • ExternalMission (4-56)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Test (20)
  • GitHub Check: Coverage
🔇 Additional comments (8)
.gitignore (1)

51-52: LGTM!

Adding docs/ to .gitignore aligns with the PR objective to fix documentation build issues.

lib/models/Kuva.ts (3)

44-47: LGTM!

Adding explicit type annotations for the parsed object improves type safety and code clarity.


78-80: LGTM!

Using optional chaining for mission.missiontype is a defensive improvement that prevents runtime errors if the property is undefined.


82-82: LGTM!

The type casting is necessary to satisfy the scrub function signature that expects Record<string, unknown>.

lib/models/Archimedea.ts (3)

26-26: LGTM! Excellent improvements to type exports and naming.

The changes export previously internal types and fix the typo (diviationdeviation), improving both the public API surface and code correctness.

Also applies to: 28-32, 34-39, 41-45


65-65: LGTM!

Improving the parameter documentation from "locale" to "Locale" enhances clarity by indicating the type.


59-59: No action needed — the property rename from diviation to deviation is complete.

Verification confirms there are no remaining references to the old property name diviation in the codebase. All instances at lines 59, 75 correctly use the new spelling deviation, and the breaking change has been properly addressed.

lib/supporting/ExternalMission.ts (1)

30-30: Review concern about making enemy optional is valid, but requires clarification on data source reliability.

Making enemy a breaking change for external consumers is a legitimate concern from a TypeScript perspective. However, the internal codebase contains no direct access to this property. The inconsistency lies in the data flow: SolnodeData.enemy is defined as required (enemy: string), but it's spread into ExternalMission where it's marked optional.

Additionally, similar properties like archwing and sharkwing include defensive null-coalescing (??) in the parse function (lines 61-62), but enemy lacks equivalent protection despite being optional. Verify that:

  1. The source API (10o.io) reliably provides the enemy field in solnodedata, or
  2. Add defensive handling for enemy matching the pattern used for other properties

@TobiTenno TobiTenno changed the title docs: update types, export more docs!: typos, types Dec 30, 2025
Copy link
Contributor

@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: 2

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4607065 and 5bd9588.

📒 Files selected for processing (2)
  • .github/workflows/ci.yaml
  • .github/workflows/docs.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Test (20)
  • GitHub Check: Coverage

Copy link
Contributor

@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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
lib/models/Kuva.ts (1)

66-66: Logic is inverted for expired flag.

The expression Date.now() - p.expiry.getTime() < 0 evaluates to true when the mission has NOT expired yet (when now < expiry). The conditional at lines 68-70 confirms this: p.activation < now && now < p.expiry checks whether the mission is currently active, indicating that now < p.expiry means the mission is not expired. The expired field should be true when now > expiry.

Fix
-    p.expired = Date.now() - p.expiry.getTime() < 0;
+    p.expired = Date.now() > p.expiry.getTime();
🧹 Nitpick comments (1)
lib/models/Kuva.ts (1)

44-47: Type mismatch: arbitration initialized as empty object but typed as ExternalMission.

The type annotation indicates arbitration should be an ExternalMission, but it's initialized as {} and cast. If no arbitration mission is found in the data, this empty object will be returned, which doesn't satisfy the ExternalMission interface (missing required fields like id, activation, expiry, etc.).

Consider using undefined or null for uninitialized state:

🔎 Suggested fix
-  const parsed: { kuva: ExternalMission[]; arbitration: ExternalMission } = {
+  const parsed: { kuva: ExternalMission[]; arbitration: ExternalMission | undefined } = {
     kuva: [],
-    arbitration: {} as ExternalMission,
+    arbitration: undefined,
   };
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5bd9588 and 93c7ab7.

📒 Files selected for processing (6)
  • .github/workflows/ci.yaml
  • .github/workflows/docs.yaml
  • .gitignore
  • lib/models/Archimedea.ts
  • lib/models/Kuva.ts
  • lib/supporting/ExternalMission.ts
🚧 Files skipped from review as they are similar to previous changes (4)
  • lib/supporting/ExternalMission.ts
  • .github/workflows/docs.yaml
  • .github/workflows/ci.yaml
  • .gitignore
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-10-16T02:24:30.860Z
Learnt from: SlayerOrnstein
Repo: WFCD/warframe-worldstate-parser PR: 702
File: lib/models/Archidemea.ts:74-90
Timestamp: 2025-10-16T02:24:30.860Z
Learning: In Warframe's Archimedea/Conquest data structure (lib/models/Archidemea.ts), Digital Extremes duplicates difficulties when adding hard tier risks. The first risk in higher difficulties (e.g., CD_HARD) is always identical to the one in the normal difficulty (CD_NORMAL), so using `slice(1)` to skip the first risk when processing additional difficulties is the correct approach to avoid duplicates.

Applied to files:

  • lib/models/Archimedea.ts
🧬 Code graph analysis (1)
lib/models/Kuva.ts (1)
lib/supporting/ExternalMission.ts (1)
  • ExternalMission (4-56)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Coverage
  • GitHub Check: Test (20)
🔇 Additional comments (7)
lib/models/Kuva.ts (2)

51-63: LGTM!

The ExternalMission object construction is well-structured. The explicit archwing and sharkwing assignments after the spread operator correctly ensure these fields have boolean values even when solnodedata is missing or incomplete.


74-81: LGTM!

The optional chaining on mission.missiontype?.startsWith adds resilience against undefined values. The separation of arbitration vs. kuva mission handling within the same time-window check is clean and logical.

lib/models/Archimedea.ts (5)

26-32: LGTM!

The newly exported Difficulty type and RawArchimedeaMission interface provide clear typing for the raw mission data structure. This improves API discoverability for consumers.


34-45: LGTM!

Clear separation between ArchimedeaMissionDifficultyRisk (with isHard flag) and ArchimedeaMissionDifficulty (without). Exporting these interfaces enables type-safe consumption by library users.


59-65: Good typo fix and type alignment.

The rename from diviation to deviation corrects the spelling. Property types now reference the newly exported interfaces, ensuring consistency.


75-79: LGTM!

The deviation assignment correctly uses the renamed property and populates it with the properly typed structure.


88-97: LGTM!

The slice(1) usage correctly handles DE's data structure where the first risk in higher difficulties duplicates the normal difficulty's risk. Based on learnings, this is the intended approach to avoid duplicates.

@TobiTenno TobiTenno merged commit 57eaa0c into master Jan 3, 2026
14 of 16 checks passed
@TobiTenno TobiTenno deleted the docs-fixes branch January 3, 2026 04:31
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.

3 participants