rust-lang / rust-lang/docs.rs

Surface warnings to users

Open
#2,434 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

E-medium
Dominant language
Rust
Stars
1.2k
Forks
232
Avg merge
11h 35m
Merged PRs (30d)
60

Description

Currently when there is an issue like a build failure crate authors need to wait till the build has been run then visit the docs page to see whether it was successful or not. Commonly instead they first discover the issue when one of their users tries to visit the docs and sees the failure and notifies them (or us directly). It would be nice if we could more proactively surface these build failures (and potentially other warnings) to the authors.

One constraint I want to keep the design under is that we do not store any server-side data to try and do something like a push notification to the users; potentially in the future there could be some opt-in integration with crates.io if they get some kind of push notification system.

Proposed design:

  • Add a new endpoint like /crate/:crate/warnings.json that provides warnings for the crate (e.g. latest version failed to build, latest version built but some targets failed, anything else we might want to add in the future)
  • Add a small drop-down widget to the top-bar for showing these warnings
    • in the widget have a button to add the current crate to the list of crates to check, this simply stores the crate name into local storage
    • on page load (maybe with a delay between re-requests stored in local storage) grab the list of subscribed crates and poll their warnings endpoints, showing some kind of notification bubble in the widget if any have a warning
  • Potentially: have some integration with crate owners, so you can subscribe to see all warnings for crates you own (or maintain through a proxy owner like rust-lang-owner) without having to manually go subscribe when you publish a new crate (this might have issues around cacheability, while the /crate/:crate/warnings.json can be heavily cached in the CDN).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the crate page, top-bar, and warning-related request entry points. The proposed work covers a /crate/:crate/warnings.json endpoint, a top-bar warning widget, local-storage subscriptions, and polling; it is done when subscribed crate warnings are surfaced without server-side notification state.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
full-stack, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.