Skip to content

feat(tui): follow school days off and make-up days in every view - #133

Merged
m1ngsama merged 2 commits into
mainfrom
feat/school-days-everywhere
Dec 5, 2026
Merged

m1ngsama merged 2 commits into
mainfrom
feat/school-days-everywhere

Conversation

@m1ngsama

@m1ngsama m1ngsama commented Dec 5, 2026

Copy link
Copy Markdown
Member

Only class details applied the school calendar, so Home, the week grid and the ICS exports still showed classes on holidays such as 国庆节放假 and left make-up days such as 上第七周(周五)的课 empty.

  • Every schedule goes through one helper that passes the term's days off and make-up days to nbtcal 0.4.7. That covers Home, today's agenda, the next-class banner, the shell prompt line, the week grid and agenda, the grid cursor, the term recap and class details.
  • On a day off the grid shows no classes, and a make-up day shows the classes it takes over. For example, Saturday 10/10 runs week 7's Friday classes.
  • Both ICS exports, the hub's e shortcut and nbtca timetable export, drop cancelled classes and move classes onto make-up days.
  • The schedule page fetches the school calendar when it opens. Until it arrives, the cached copy or the plain weekly pattern is used, and the CLI export keeps the weekly pattern if the calendar can't be loaded.
  • Class details now use nbtcal's cancelled() and rescheduledFrom, which replaces Prompt's own copy of that logic.

Only class details applied the school calendar. Home, today's agenda,
the next-class banner, the shell prompt line, the week grid and agenda,
the term recap and both ICS exports still listed classes on holidays
such as 国庆节放假 and left make-up days such as 上第七周(周五)的课
empty.

Build every schedule through one helper that passes the term's days off
and make-up days from the school calendar to nbtcal, so a holiday shows
no classes and a make-up day shows the classes it takes over. The
schedule page fetches the school calendar when it opens; until then the
cached copy, or the plain weekly pattern, is used. `timetable export`
reads the same calendar and keeps the weekly pattern when it cannot.

This needs the nbtcal release that adds `schoolDays`.
Every schedule now passes `schoolDays` to nbtcal, and class details read
`cancelled()` and `rescheduledFrom`. All three arrive in nbtcal 0.4.7.
@m1ngsama
m1ngsama merged commit d151fa2 into main Dec 5, 2026
4 checks passed
@m1ngsama m1ngsama mentioned this pull request Dec 5, 2026
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.

1 participant