Skip to content

Adding LiftWing model visualization feature#83

Open
Nirmeet-kamble wants to merge 1 commit intoWikimedia-Suomi:mainfrom
Nirmeet-kamble:lift
Open

Adding LiftWing model visualization feature#83
Nirmeet-kamble wants to merge 1 commit intoWikimedia-Suomi:mainfrom
Nirmeet-kamble:lift

Conversation

@Nirmeet-kamble
Copy link
Copy Markdown
Contributor

@Nirmeet-kamble Nirmeet-kamble commented Oct 14, 2025

This PR introduces the initial structure for the LiftWing model visualization feature, as described in Issue #70

It adds a new web page and basic API endpoints to support wiki and article selection, as the first step toward full visualization of LiftWing model scores across Wikipedia article revision histories.

What's Implemented

  • New route & template for LiftWing visualization page (/liftwing/)
  • Basic HTML UI for selecting wiki and validating article existence
  • New validate_article API endpoint (currently stubbed with simple string length check)
  • Static model list endpoint (liftwing_models) returning example model data
  • Added URL patterns in urls.py for new endpoints
  • Added liftwing_page view and lift.html template with basic styling and client-side validation logic

To-Do

  • This PR is incomplete. The following major items still need to be implemented before closing Add LiftWing model visualization feature #70:
  • Article validation via real MediaWiki API instead of placeholder check
  • Revision history fetching for selected article, including pagination
  • Database integration to cache revision data and model predictions
  • Model selection UI (currently hardcoded static model list)
  • LiftWing API integration for fetching model predictions per revision
  • Caching logic to avoid duplicate API calls
  • Line chart visualization (Chart.js or similar) showing model scores over revisions
  • Revision list table synced with graph (timestamps, usernames, comments, clickable diffs)
  • Error handling, loading indicators, and async fetching for large revision sets

@Nirmeet-kamble
Copy link
Copy Markdown
Contributor Author

Nirmeet-kamble commented Oct 14, 2025

@Teja-Sri-Surya As discussed earlier in the comment you can take the to do and start working
I will really appreciate it
Let's complete it together .

@Teja-Sri-Surya
Copy link
Copy Markdown
Contributor

Teja-Sri-Surya commented Oct 14, 2025

Hi @Nirmeet-kamble 👋

I’ve completed reviewed and tested the PR #83 locally. The /liftwing/ page loads correctly, and the basic wiki and article selection UI works as expected.

Now, I’ll start working, which is implementing article validation using the real MediaWiki API instead of the current placeholder check. Once that’s ready, I’ll share the implementation and testing results here for review.

Excited to continue improving this feature

@Nirmeet-kamble
Copy link
Copy Markdown
Contributor Author

@Teja-Sri-Surya Please let me know which all to do task you are taking so i can work on the rest

@Teja-Sri-Surya
Copy link
Copy Markdown
Contributor

Hi @Nirmeet-kamble 👋

Thanks for the update! I’ll take care of implementing the article validation using the real MediaWiki API, replacing the current placeholder logic in validate_article.

Specifically, I’ll:

Use the MediaWiki action=query&titles= API to verify that an article exists on the selected wiki.

Handle cases for missing or invalid titles gracefully (e.g., showing an error message on the UI).

Return structured JSON responses (e.g., {"exists": true, "title": "Earth", "pageid": 9234}) from the backend.

Test the integration from the /liftwing/ page to confirm proper validation flow.

Once done, I’ll push the changes and tag you for review.

@zache-fi
Copy link
Copy Markdown
Contributor

@Nirmeet-kamble , @Teja-Sri-Surya if you are working with this, please update to latest main?

Teja-Sri-Surya added a commit to Teja-Sri-Surya/PendingChangesBot-ng that referenced this pull request Oct 24, 2025
…tion feature

 COMPLETE IMPLEMENTATION:
- Real MediaWiki API integration for article validation
- Full revision history fetching with pagination (up to 50 revisions)
- LiftWing API integration with parallel requests (10x performance improvement)
- Database models for caching (LiftWingPrediction, ArticleRevisionHistory)
- Interactive Chart.js visualization with quality score mapping
- Comprehensive error handling and loading indicators
- All merge conflicts resolved

 PERFORMANCE OPTIMIZATIONS:
- Parallel API requests using ThreadPoolExecutor
- Smart caching to avoid duplicate calls
- Batch processing for large revision sets
- Timeout protection and error recovery

 FEATURES:
- Interactive Chart.js line graph showing quality scores over time
- Revision history table with clickable Wikipedia diffs
- Real-time loading indicators and progress bar
- Support for 6 Wikipedia languages
- Quality score mapping (FA=6, GA=5, B=4, C=3, Start=2, Stub=1)

This completes the original PR Wikimedia-Suomi#83 with full functionality as requested by @Nirmeet-kamble.
Collaboration: Initial structure by @Nirmeet-kamble, complete implementation by @Teja-Sri-Surya
Teja-Sri-Surya added a commit to Teja-Sri-Surya/PendingChangesBot-ng that referenced this pull request Oct 25, 2025
- Add comprehensive LiftWing API integration with parallel requests
- Add article validation using real MediaWiki API
- Add revision history fetching with pagination support
- Add database models for caching predictions and revision data
- Add interactive Chart.js visualization with line graphs
- Add revision history table with clickable Wikipedia diffs
- Add support for 6 Wikimedia ML models (articlequality, draftquality, revertrisk, etc.)
- Add responsive UI with loading indicators and error handling
- Add parallel request optimization for 10x performance improvement
- Add comprehensive error handling and timeout protection

Completes PR Wikimedia-Suomi#83 - All TODO items implemented
Fixes Wikimedia-Suomi#70
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