Skip to content

Commit de9bc2e

Browse files
committed
added changelog.md so release.yml can generate a proper changelog
1 parent f72ba2f commit de9bc2e

2 files changed

Lines changed: 145 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 64 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,76 @@ jobs:
141141
needs: [prep, linux-deb-and-tar, windows-exe, flatpak]
142142
runs-on: ubuntu-latest
143143
steps:
144+
- name: Checkout (to read CHANGELOG.md)
145+
uses: actions/checkout@v4
146+
with:
147+
fetch-depth: 0
148+
144149
- name: Download all artifacts
145150
uses: actions/download-artifact@v4
146151
with:
147152
path: ./artifacts
153+
148154
- name: List artifacts (some may be missing if a job failed)
149155
run: find ./artifacts -type f -maxdepth 3 -print || true
150-
- name: Create GitHub Release and upload assets
156+
157+
- name: Extract release notes from CHANGELOG.md (if present)
158+
id: gen_notes
159+
shell: bash
160+
run: |
161+
set -euo pipefail
162+
TAG="${GITHUB_REF_NAME}"
163+
VER="${TAG#v}"
164+
FILES=("CHANGELOG.md" "docs/CHANGELOG.md")
165+
OUT="RELEASE_NOTES.md"
166+
found=false
167+
168+
for f in "${FILES[@]}"; do
169+
if [[ -f "$f" ]]; then
170+
# Extract section that starts with "## vX.Y.Z" (or "## X.Y.Z") until the next "## "
171+
awk -v ver="$VER" '
172+
BEGIN {
173+
# allow headings like "## v1.2.3" or "## 1.2.3"
174+
pat1="^##[[:space:]]*v" ver "([[:space:]]|$)"
175+
pat2="^##[[:space:]]*" ver "([[:space:]]|$)"
176+
insec=0
177+
}
178+
{
179+
if ($0 ~ /^##[[:space:]]/) {
180+
if (insec) exit
181+
if ($0 ~ pat1 || $0 ~ pat2) { insec=1; next }
182+
}
183+
if (insec) print
184+
}
185+
' "$f" > "$OUT"
186+
if [[ -s "$OUT" ]]; then
187+
echo "has_notes=true" >> "$GITHUB_OUTPUT"
188+
echo "notes_path=$OUT" >> "$GITHUB_OUTPUT"
189+
found=true
190+
break
191+
fi
192+
fi
193+
done
194+
195+
if [[ "$found" != "true" ]]; then
196+
echo "has_notes=false" >> "$GITHUB_OUTPUT"
197+
fi
198+
199+
- name: Create GitHub Release (with CHANGELOG body)
200+
if: steps.gen_notes.outputs.has_notes == 'true'
201+
uses: softprops/action-gh-release@v2
202+
with:
203+
tag_name: ${{ github.ref_name }}
204+
name: ${{ github.ref_name }}
205+
body_path: ${{ steps.gen_notes.outputs.notes_path }}
206+
fail_on_unmatched_files: false
207+
files: |
208+
artifacts/linux/**
209+
artifacts/windows/**
210+
artifacts/flatpak/**
211+
212+
- name: Create GitHub Release (auto-generated notes)
213+
if: steps.gen_notes.outputs.has_notes != 'true'
151214
uses: softprops/action-gh-release@v2
152215
with:
153216
tag_name: ${{ github.ref_name }}

CHANGELOG.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
The format roughly follows Keep a Changelog, and dates are in YYYY-MM-DD.
5+
6+
## [v0.2.1] — 2025-10-18
7+
8+
### Highlights
9+
- Reliable searches and infinite scroll with a clear “End of results” message.
10+
- “New” tab now fairly interleaves results from all sites (round‑robin) and appends new items without jumping your view.
11+
- “Popular” remains globally sorted, with scroll-position preservation when a re‑order is required.
12+
- Danbooru: filter takedowns and gold‑only/restricted posts (when not viewable with your account).
13+
- Video groundwork in the lightbox (CSP and sizing); proxy fallback for media that requires headers.
14+
- Remote “Favorite” (site API) button appears when credentials are configured.
15+
16+
### Added
17+
- Lightbox video handling
18+
- Render videos as a video element with controls, muted autoplay, loop, and playsInline.
19+
- Fallback: if the CDN blocks direct loads, try an in‑app proxy that preserves Referer.
20+
- If the environment can’t decode the video (e.g., missing H.264/AAC), a tip suggests using “Open Media.”
21+
- Content-Security-Policy
22+
- index.html now allows media (`media-src`) so videos can load in the app.
23+
- Remote “Favorite” via site APIs
24+
- When a site in Manage Sites has valid credentials, cards and lightbox show a “♥ Favorite” button:
25+
- Danbooru: login + API key
26+
- Moebooru: login + password_hash
27+
- Uses the site’s favorite endpoints to add/remove favorites; initial state uses site flags when available (e.g., Danbooru’s `is_favorited`).
28+
29+
### Changed
30+
- Thumbnails in the grid (cards)
31+
- Prefer `sample_url` (or full `file_url`) for images so Danbooru thumbs are sharp.
32+
- For video posts, fall back to preview (Danbooru only provides a small static preview for videos).
33+
- New tab behavior
34+
- Switch to a true round‑robin interleave across all configured sites, append‑only per fetch.
35+
- Newer items discovered later won’t jump to the top (prevents viewport shifts).
36+
- Popular tab behavior
37+
- Still globally sorted by popularity/recency. If new items strictly belong at the end, we append; otherwise we re‑render while preserving scroll to avoid “teleporting.”
38+
- Search tab behavior
39+
- Continues using round‑robin interleaving across sites (fair mixing of results).
40+
- Card actions layout
41+
- Actions row now uses a two‑column grid so 3–4 buttons (Open Post, Open Media, Favorite, Save) fit without clipping on narrow cards.
42+
43+
### Fixed
44+
- New search at end‑of‑pagination yielded no images
45+
- Implemented robust fetch coordination with a generation token and a queued‑fetch flag; drops stale responses after resets.
46+
- Endless “Loading…” when results are exhausted
47+
- Added `noMoreResults` guard; displays “End of results” and stops auto‑fetching when a batch adds zero new posts.
48+
- Scroll jumps when loading a new batch
49+
- Append‑only rendering when possible; when a global sort is needed, re‑render while preserving scroll from the nearest visible anchor.
50+
- Remote favorite POST errors
51+
- Removed manual `Content-Length` in POST form requests; let Chromium set it to avoid `net::ERR_INVALID_ARGUMENT`.
52+
- Danbooru: hide posts that shouldn’t be shown
53+
- Filter out takedowns (`is_banned`, `is_deleted`).
54+
- Filter out gold‑only or otherwise restricted posts for non‑gold accounts (no `file_url` and no `large_file_url` and no `media_asset.variants` with `sample` or `original`). If you log in with a gold account, these posts will appear as media URLs become available.
55+
56+
### Known Issues
57+
- Lightbox video playback on some Linux builds
58+
- Electron builds often lack proprietary codecs (H.264/AAC), so many MP4s show 0:00 and won’t play. Workarounds:
59+
- Replace Electron’s `libffmpeg.so` with your distro’s “chromium‑codecs‑ffmpeg‑extra” (or equivalent with proprietary codecs).
60+
- Use “Open Media” to view in your default browser.
61+
- WebM typically works. The lightbox shows a small tip when codecs are unsupported.
62+
- Softer thumbnails for video posts
63+
- Danbooru only provides small static previews for videos; grid thumbs for video entries may look blurry. Image posts remain sharp via `sample_url`.
64+
- Remote favorites
65+
- Favorite button only appears when credentials are present for a site. We show an alert on auth or rate‑limit errors; state is not auto‑refreshed from the server after out‑of‑band changes.
66+
- End‑of‑results detection is conservative
67+
- We mark end‑of‑results when a fetch adds zero new items across all sites. Some sites might still return data in later attempts.
68+
- Intentional behavior: “New” does not reorder
69+
- Newer posts fetched later are appended at the end by design so your current view doesn’t shift. Use “Popular” if you want a globally resorted feed.
70+
71+
### Developer Notes
72+
- State coordination
73+
- Added `fetchGen` to drop stale responses across resets, `pendingFetch` to queue a fetch while one is in flight, and `noMoreResults` to halt further loads at the end.
74+
- New tab keeps a `feedSeen` set and a rolling `rrCursor` for fair round‑robin across sites per fetch.
75+
- Search tab keeps `searchBuckets` and `searchSeen` to fairly interleave de‑duplicated results.
76+
- Network
77+
- Image/media requests continue to set site‑specific Referer headers; proxy endpoint returns data URLs for render safety when direct loads fail.
78+
- UI
79+
- Popular re‑sort path preserves scroll via nearest visible anchor element; append‑only path avoids any scroll changes.
80+
81+
[v0.2.1]: https://github.com/Amateur-God/StreamBooru/releases/tag/v0.2.1

0 commit comments

Comments
 (0)