feat(young): expose second-classroom events across all interfaces - #997
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
life-ustc | 7bf9eb1 | Sep 02 2026, 03:51 AM |
tiankaima-copilot
pushed a commit
that referenced
this pull request
Sep 2, 2026
tiankaima-copilot
pushed a commit
that referenced
this pull request
Sep 2, 2026
Import young.ustc.edu.cn signup events from the static snapshot into a new YoungEvent model, then surface them through REST (/api/catalog/young-events), GraphQL (catalog.youngEvents/youngEvent), MCP (catalog_young_event_*), and the web catalog (/catalog/young-events) with zh/en i18n, navigation, and sitemap entries.
imageUrl stored from the static snapshot is a raw young.ustc.edu.cn pic path, so rendering it directly hotlinks (and breaks, since the path is relative). Add GET /api/catalog/young-events/[youngId]/image: serve from R2_PUBLICATIONS under young-events/images/ with immutable cache headers; on miss fetch https://young.ustc.edu.cn/login/<pic>, persist via waitUntil, and stream to the client. The service now exposes the local proxy path as imageUrl across REST/GraphQL/MCP/web.
tiankaima-copilot
force-pushed
the
feat/young-events
branch
from
September 2, 2026 03:45
e785090 to
57b21e8
Compare
…buse Only persist image/* payloads (an upstream error page would otherwise become immutable same-origin content), cap origin reads at 10 MB, and add short CDN caching to 404/502 image responses to absorb repeat misses. Also return youngId in the MCP found payload for consistency with the not-found shape.
tiankaima-copilot
force-pushed
the
feat/young-events
branch
from
September 2, 2026 03:49
57b21e8 to
7bf9eb1
Compare
github-actions Bot
pushed a commit
that referenced
this pull request
Sep 2, 2026
# [1.103.0](v1.102.1...v1.103.0) (2026-09-02) ### Bug Fixes * **graphql:** update MCP operation manifest count after young events ops ([#1003](#1003)) ([6450a9a](6450a9a)), closes [#997](#997) ### Features * **young:** expose second-classroom events across all interfaces ([#997](#997)) ([9c22931](9c22931))
Contributor
|
🎉 This PR is included in version 1.103.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Import 第二课堂 signup events from young.ustc.edu.cn (cached in the life-ustc/static snapshot) into the server database, and expose them on every interface.
src/static-loader/young-plan.tsreadsyoung_mobile_item_enrolment_list_result_recordsfrom the static snapshot; skipped when the snapshot has no young-events metadata.YoungEventmodel + migration; dev seed adds one active and one ended event.src/features/young/server/young-event-service.ts(list / detail / categories), shared by all transports.GET /api/catalog/young-events(+/[youngId]) with regenerated OpenAPI spec.catalog.youngEvents/catalog.youngEvent+ registered opscatalog.young_event.list.v1/catalog.young_event.get.v1; SDL snapshot updated.catalog_young_event_list/catalog_young_event_get(anonymous scope); compact dispatcher guards against the course-compaction heuristic mangling young events./catalog/young-eventslist (search, signup-status filter, pagination) and/[youngId]detail pages, zh/en i18n, nav entries, sitemap (active events only).GET /api/catalog/young-events/[youngId]/image— lazy cache-aside proxy into R2 (R2_PUBLICATIONS, keysyoung-events/images/<pic path>, immutable cache headers, ETag/304). The storedimageUrlis the platform's raw relativepicpath; on miss the Worker fetcheshttps://young.ustc.edu.cn/login/<pic>once and persists it viawaitUntil. All interfaces expose the local proxy path asimageUrl.Verification
tsc(all three typecheck configs),svelte-check, GraphQL SDL snapshot all cleanScreenshots
Captured against real data imported from the life-ustc/static snapshot (2556 events; detail page: 东野圭吾作品读书心得征集), desktop 1280px.
The detail poster is served through the new R2-backed proxy route (verified end-to-end: first hit fetches origin ~1s, second hit serves from R2 in ~10ms).
/catalog/young-events— 列表(zh / en)/catalog/young-events/[youngId]— 详情(zh / en)