Skip to content

merge with mascal - #42

Open
Joshua2504 wants to merge 755 commits into
CoR-Forum:v2from
mascaldotfr:main
Open

merge with mascal#42
Joshua2504 wants to merge 755 commits into
CoR-Forum:v2from
mascaldotfr:main

Conversation

@Joshua2504

Copy link
Copy Markdown

No description provided.

@Joshua2504
Joshua2504 requested a review from Copilot March 29, 2025 15:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This PR merges updates from the mascal branch into main by standardizing error reporting and refreshing version information. Key changes include:

  • Adding an eprint() function to both warstatus scripts for consistent error output.
  • Replacing print calls with eprint in error-handling blocks.
  • Updating version strings in JavaScript files and adding a maintenance notice in the README.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
warstatus/warstatus.py Introduces error logging via eprint and replaces print calls.
warstatus/stats/generate.py Updates error messages to use eprint for consistency.
js/menu.js Updates version information.
js/bosses.js Updates respawn timestamps and corresponding comments.
README.md Adds a maintenance mode notice with links for further developments.
Comments suppressed due to low confidence (2)

warstatus/warstatus.py:51

  • [nitpick] Consider removing the extra space before the exclamation mark to ensure the error message is clear and consistent.
eprint("Failed to fetch the page ! " + traceback.format_exc())

warstatus/warstatus.py:223

  • [nitpick] Consider rephrasing this error message for clarity, for example: 'Unexpected upstream HTML format or server reboot detected; aborting operation.'
eprint("Messed up upstream HTML or server reboot, write nothing")

@Joshua2504 Joshua2504 self-assigned this Mar 29, 2025
@mascaldotfr

mascaldotfr commented Apr 30, 2025

Copy link
Copy Markdown

Hi @Joshua2504,

Copilot is WAY too dumb to solve this 🤣 It requires ancient, pre-Github wizardry: mail patches, with path manipulation.

I could have just pushed the branch, but I think it's interesting for you to get to know how to do it, for the future :

git clone https://github.com/mascaldotfr/CoRT.git
cd CoRT

# Get the last 6 patches; you can also specify a specific commit and stuff
# Your menu.js is too different to get merged
git format-patch --stdout -6 ':!js/menu.js' > /tmp/mascal_changes.patch

# Change paths (hopefully I almost never change html stuff ahah)
# That's MacOS syntax already for sed(1) iirc
sed -E -i '' 's@(a|b)/(js|data)@\1/public/\2@g' /tmp/mascal_changes.patch

# Get back to your own repo
cd /where/is/yourCoRT

# We create our own branch
git checkout v2 # your main branch
git checkout -b mascal_import20250430 # create an import branch

# Then we apply the patch
git am /tmp/mascal_changes.patch

# All your commits are already in that branch
git log

# Just push the branch
git push origin mascal_import20250430:mascal_import20250430

And then you can PR from Github :)

It’s very fashionable nowadays for a few vibe coders in the community to
not know how to rate-limit their stuff. So:

- Apply CORS and restrict access to my own websites.
- Add instructions for vibe coders in the API rate-limit documentation
  about CORS. That should be enough for them to understand what an API
  proxy is—or, at worst, rewrite my API themselves.
- Some people apparently don’t know about HTTP 429. A four-hour ban by
  my WAF should probably help them figure it out, and your users to
  effed out on both side, your site and cort.ovh.

I’ve said it before: fork my stuff, recycle it, that’s fine. But come
with your own infrastructure if you don't plan reasonable use.

And always remember api/README.md: I owe you nothing, and it’s
reciprocal.
... as NGE likes to not renew their server certs on time.

mascal's clumsiness fix from Joshua, thanks!
Already in production
This one is only for cort.ovh:

- Use vite as a simple build pipeline; I'll need code splitting
  soon(tm), and my bundler doesn't do that
- Remove preloads as vite knows what he has to do, waterfall seems ok
- the old release script is still around, I'll need to rewrite it as
  well
- Ensure the API is fetched ASAP
- Ensure that the latest trainerdataset is loaded in index.html
We don't need --mascal anymore, it's dealt with /deploy/production
Preferred by the netizens, as it's faster.
I forgot that I have special needs here compared to sentinel. We bail.

This reverts commit 6933659.
I don't release everyday, don't need to bloat backups.
Allow to use global meta/link/whatever tags and preloads in one pass,
with a separation of concerns.

While here, bring back the openGraph image.
- Was asked many times; some people have really bad connections, and
  reduce the bundle of stuff to download during a cold visit
- By the way, it's what CoRT used to do in the past!
- This hides tips that we all know about on top of the page, while
  letting newcomers get unlimited ~~power~~ tips. Best of both worlds.
Mobile users will rejoice. I dropped the animation because it was catchy
xD
WSTATS has so many stuff in it I didn't notice I was messing up the
hourly graphs by not using the proper time format.

As such, there will be 2 formatters, 1 for display, the other for
internal use by chartist.
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