Urgent.News

What's breaking now, across thousands of outlets.

Tech

Two routes in our app return 404 in production on purpose, and they are how every card image gets made

Nearly every practice card on CogniPrep's public pages shows a still of the thing in play. The SHL hub has one per test, and the numerical reasoning format page reuses the same images across providers. They are not mockups and they are not hand-built. They are browser screenshots of the real screens. Which raises a problem. The real screens need a signed-in account with the right entitlements,…

Two routes within the app deliberately return a 404 error in production, serving as the basis for generating each card image. These routes are employed only on a developer's machine, bypassing the need for sign-in and authentication. When the application is built in production, the pages return a 404 status code, refusing to render.

The sibling route for assessment centre exercises follows a similar pattern, with the notable difference being that the exercise runner accepts the entire exercise as a prop, eliminating the need for an additional API route. The notFound() function provides clarity regarding the page's purpose, indicating that it is not intended for indexing.

The arithmetic behind the crop settings is designed to ensure whole regions without any cropping. The crop settings for games and exercises are tailored to their respective content, with a 16:10 aspect ratio maintained for optimal display. The resulting PNG images are resized to a lower resolution before being used, ensuring compatibility and reducing file size.

A manifest file is generated to keep track of the captured images, allowing the card component to determine whether an image exists before rendering it. This process ensures that cards can access valid images, maintaining the overall functionality and appearance of the application.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

The Narrow Sidewalk: Where Developers Stand When Agents Write the Code

When coding agents such as Claude Code and Codex became good enough to take whole tasks, the first reaction in our industry was very loud: developers would be replaced, and soon.

  • Developers still write code manually while agents assist.
  • Agents struggle with error differentiation, returning 403 Forbidden for all users.
  • Middle path requires developers to balance expertise with agent assistance.

A generated video still needs a receipt and a stopped runtime

The five-second video existed, but the embedded UI had not caught up. Its completion message and receipt field did not update, and its exit button remained disabled.

  • Generated video required receipt and stopped runtime confirmation
  • UI failed to update completion message and receipt field
  • Video and settings matched recorded receipt records

Our session history rebuilds last week's quiz from the pack, and the pack is not where the quiz was recorded

PubTrivia keeps every quiz you have run : the final leaderboard in full, and a question-by-question record of what each table answered, for the landlord who gets a complaint a week later.

  • PubTrivia retains every quiz hosted with final leaderboard and detailed question records
  • Bug in history screen displays zeros for correct answers instead of actual scores
  • Fix requires fetching specific session questions, not first N from pack

More from Sunday 18 October →