Skip to content

feat(tui): mute secondary data and color the week overview - #118

Merged
m1ngsama merged 1 commit into
mainfrom
feat/muted-tier
Nov 19, 2026
Merged

m1ngsama merged 1 commit into
mainfrom
feat/muted-tier

Conversation

@m1ngsama

Copy link
Copy Markdown
Member

Secondary text rendered at full strength, so finished classes, rooms, empty cells, and separators all competed with what students look for. #92 removed chalk.dim from type.hint so status and navigation text follow the terminal foreground; that decision stays. As a side effect, the dimming that #113 added for finished classes never reached the terminal.

A new type.muted tier now marks data that is present but not current. It is a fixed #7c8594 gray on truecolor terminals and ANSI bright black elsewhere. SGR dim is avoided because some palettes render it nearly invisible. It applies to:

  • classes that have ended, with their start time, room, and "已结束", in today's timeline and the week list
  • past weeks in a class detail's week strip
  • rooms, empty cells, and rules in the full timetable grid
  • separators and the recurring mark in event lists, dates of events more than a week away, and empty heatmap days

Home's week overview showed classes and events in the same gray ▓▓. When a day had both, the two cells joined into one bar. Classes are now brand blue and events green, free days are muted, and the legend names both. A lower block, ▆▆, leaves a gap between the two rows, and the legend wraps rather than switching narrow terminals to the vertical layout. weekAheadBusy ("有安排") had no remaining use, so it is removed.

NO_COLOR and --plain output is unchanged: nbtca events --month --plain contains no escape codes.

Validation: npm run check passes, and the full test suite also passes with TZ=America/Los_Angeles. New tests pin the muted color at each color level and check that a finished class is muted while a later one is not. I compared Home and the Schedule hub before and after with the cached timetable at 100×34.

@m1ngsama
m1ngsama merged commit 60eefd7 into main Nov 19, 2026
4 checks passed
@m1ngsama
m1ngsama deleted the feat/muted-tier branch November 19, 2026 02:55
@m1ngsama m1ngsama mentioned this pull request Nov 19, 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