/opt/docker/tg-bot-ts-dev/src/subcommands/poll/mark-left.ts:26:  const historyKey = TGKey.current({ slot });
/opt/docker/tg-bot-ts-dev/src/subcommands/poll/mark-left.ts:31:    historyKey,
/opt/docker/tg-bot-ts-dev/src/subcommands/poll/mark-left.ts:58:  const historyKey = TGKey.current({ slot });
/opt/docker/tg-bot-ts-dev/src/subcommands/poll/mark-left.ts:59:  Leaves.unmark({ characterName: char.name, historyKey });
/opt/docker/tg-bot-ts-dev/src/systems/attendance.ts:19:   [historyKey: TGKey]: UserKey[];
/opt/docker/tg-bot-ts-dev/src/systems/attendance.ts:38:     const historyKey = TGKey.current({ slot });
/opt/docker/tg-bot-ts-dev/src/systems/attendance.ts:39:     _data[historyKey] = [...lockedYesKeys];
/opt/docker/tg-bot-ts-dev/src/systems/attendance.ts:46:   players(historyKey: TGKey): UserKey[] {
/opt/docker/tg-bot-ts-dev/src/systems/attendance.ts:47:     return _data[historyKey] ?? [];
/opt/docker/tg-bot-ts-dev/src/systems/attendance.ts:53:   includes(historyKey: TGKey, userKey: UserKey): boolean {
/opt/docker/tg-bot-ts-dev/src/systems/attendance.ts:54:     return (_data[historyKey] ?? []).includes(userKey);
/opt/docker/tg-bot-ts-dev/src/systems/attendance.ts:60:   allSubmitted(historyKey: TGKey): boolean {
/opt/docker/tg-bot-ts-dev/src/systems/attendance.ts:61:     const players = _data[historyKey] ?? [];
/opt/docker/tg-bot-ts-dev/src/systems/attendance.ts:65:         fs.readFileSync(Paths.data("tg-history", `${historyKey}.json`), "utf8")
/opt/docker/tg-bot-ts-dev/src/systems/attendance.ts:77:   all(): TGKey[] {
/opt/docker/tg-bot-ts-dev/src/systems/attendance.ts:78:     return Object.keys(_data) as TGKey[];
/opt/docker/tg-bot-ts-dev/src/systems/wrank.ts:44:  scoreIndex: Record<CharName, TGKey[]>;
/opt/docker/tg-bot-ts-dev/src/systems/wrank.ts:150:    historyKey:    TGKey
/opt/docker/tg-bot-ts-dev/src/systems/wrank.ts:158:      const alreadyCounted = week.scoreIndex[characterName]?.includes(historyKey);
/opt/docker/tg-bot-ts-dev/src/systems/wrank.ts:181:    if (!week.scoreIndex[characterName].includes(historyKey)) {
/opt/docker/tg-bot-ts-dev/src/systems/wrank.ts:182:      week.scoreIndex[characterName].push(historyKey);
/opt/docker/tg-bot-ts-dev/src/systems/history.ts:8:const HISTORY_DIR = path.join(__dirname, "../../data/tg-history");
/opt/docker/tg-bot-ts-dev/src/systems/history.ts:10:function historyKey(date: string, slot: number): string {
/opt/docker/tg-bot-ts-dev/src/systems/history.ts:19:  return Store.read(historyPath(historyKey(date, slot)));
/opt/docker/tg-bot-ts-dev/src/systems/history.ts:23:  Store.write(historyPath(historyKey(result.date, result.slot)), result);
/opt/docker/tg-bot-ts-dev/src/systems/updates.ts:82:     historyKey:    string;
/opt/docker/tg-bot-ts-dev/src/systems/updates.ts:186:     Leaves.mark({ characterName: l.characterName, ownerKey: "example", historyKey: l.historyKey as any, markedBy: "example" });
/opt/docker/tg-bot-ts-dev/src/systems/updates.ts:190:       Leaves.unmark({ characterName: l.characterName, historyKey: l.historyKey as any });
/opt/docker/tg-bot-ts-dev/src/systems/updates.ts:228:          historyKey: exampleData.leaves?.[0]?.historyKey
/opt/docker/tg-bot-ts-dev/src/systems/score.ts:52: function getHistoryPath(historyKey: TGKey): string {
/opt/docker/tg-bot-ts-dev/src/systems/score.ts:53:   return Paths.data("tg-history", `${historyKey}.json`);
/opt/docker/tg-bot-ts-dev/src/systems/score.ts:56: function loadHistory(historyKey: TGKey): { scores: TGScore[] } {
/opt/docker/tg-bot-ts-dev/src/systems/score.ts:57:  return Store.readOrDefault(getHistoryPath(historyKey), { scores: [] });
/opt/docker/tg-bot-ts-dev/src/systems/score.ts:59:function saveHistory(historyKey: TGKey, data: { scores: TGScore[] }): void {
/opt/docker/tg-bot-ts-dev/src/systems/score.ts:60:  Store.write(getHistoryPath(historyKey), data);
/opt/docker/tg-bot-ts-dev/src/systems/score.ts:71:     const historyKey = TGKey.current({ slot });
/opt/docker/tg-bot-ts-dev/src/systems/score.ts:72:     const history    = loadHistory(historyKey);
/opt/docker/tg-bot-ts-dev/src/systems/score.ts:86:     for (const historyKey of (week.scoreIndex[character.name] ?? [])) {
/opt/docker/tg-bot-ts-dev/src/systems/score.ts:87:       const history = loadHistory(historyKey as TGKey);
/opt/docker/tg-bot-ts-dev/src/systems/score.ts:128:     const historyKey = TGKey.current({ slot });
/opt/docker/tg-bot-ts-dev/src/systems/score.ts:129:     const history    = loadHistory(historyKey);
/opt/docker/tg-bot-ts-dev/src/systems/score.ts:165:     saveHistory(historyKey, history);
/opt/docker/tg-bot-ts-dev/src/systems/score.ts:174:       historyKey
/opt/docker/tg-bot-ts-dev/src/systems/tg-key.ts:8: *   const key = TGKey.current({ slot: 20 })
/opt/docker/tg-bot-ts-dev/src/systems/tg-key.ts:9: *   const key = TGKey.from({ date: "2026-06-11", slot: 20 })
/opt/docker/tg-bot-ts-dev/src/systems/tg-key.ts:10: *   TGKey.parse(key)         // { date: "2026-06-11", slot: 20 }
/opt/docker/tg-bot-ts-dev/src/systems/tg-key.ts:11: *   TGKey.toHistoryPath(key) // ".../tg-history/2026-06-11-20.json"
/opt/docker/tg-bot-ts-dev/src/systems/tg-key.ts:18: export const TGKey = {
/opt/docker/tg-bot-ts-dev/src/systems/tg-key.ts:19:   from({ date, slot }: { date: Date | string; slot: number }): TGKey {
/opt/docker/tg-bot-ts-dev/src/systems/tg-key.ts:23:     return `${d}-${slot}` as TGKey;
/opt/docker/tg-bot-ts-dev/src/systems/tg-key.ts:26:   current({ slot }: { slot: number }): TGKey {
/opt/docker/tg-bot-ts-dev/src/systems/tg-key.ts:27:     return TGKey.from({ date: new Date(), slot });
/opt/docker/tg-bot-ts-dev/src/systems/tg-key.ts:30:   parse(key: TGKey): { date: string; slot: number } {
/opt/docker/tg-bot-ts-dev/src/systems/tg-key.ts:38:   toHistoryPath(key: TGKey): string {
/opt/docker/tg-bot-ts-dev/src/systems/tg-key.ts:39:     return Paths.data("tg-history", `${key}.json`);
/opt/docker/tg-bot-ts-dev/src/systems/tg-key.ts:43:   toDisplay(key: TGKey): string {
/opt/docker/tg-bot-ts-dev/src/systems/tg-key.ts:44:     const { date, slot } = TGKey.parse(key);
/opt/docker/tg-bot-ts-dev/src/systems/tg-key.ts:49:   /** Check if a string is a valid TGKey */
/opt/docker/tg-bot-ts-dev/src/systems/tg-key.ts:50:   isValid(key: string): key is TGKey {
/opt/docker/tg-bot-ts-dev/src/systems/scores.ts:74:  const historyKey = `${date}-${String(sub.slot).padStart(2, "0")}`;
/opt/docker/tg-bot-ts-dev/src/systems/scores.ts:95:  WRank.recordScore(sub.userKey, sub.characterName, sub.cls, sub.nation, sub.pts, historyKey);
/opt/docker/tg-bot-ts-dev/src/systems/leaves.ts:10: *   Leaves.mark({ characterName, historyKey, markedBy })
/opt/docker/tg-bot-ts-dev/src/systems/leaves.ts:11: *   Leaves.unmark({ characterName, historyKey })
/opt/docker/tg-bot-ts-dev/src/systems/leaves.ts:12: *   Leaves.hasLeft({ characterName, historyKey })
/opt/docker/tg-bot-ts-dev/src/systems/leaves.ts:30:   historyKey: TGKey;
/opt/docker/tg-bot-ts-dev/src/systems/leaves.ts:61:   mark({ characterName, ownerKey, historyKey, markedBy }: {
/opt/docker/tg-bot-ts-dev/src/systems/leaves.ts:64:     historyKey:    TGKey;
/opt/docker/tg-bot-ts-dev/src/systems/leaves.ts:71:     if (char.history.some((r) => r.historyKey === historyKey)) return; // already marked
/opt/docker/tg-bot-ts-dev/src/systems/leaves.ts:72:     char.history.push({ historyKey, markedBy, markedAt: new Date().toISOString() });
/opt/docker/tg-bot-ts-dev/src/systems/leaves.ts:77:   unmark({ characterName, historyKey }: {
/opt/docker/tg-bot-ts-dev/src/systems/leaves.ts:79:     historyKey:    TGKey;
/opt/docker/tg-bot-ts-dev/src/systems/leaves.ts:83:       (r) => r.historyKey !== historyKey
/opt/docker/tg-bot-ts-dev/src/systems/leaves.ts:89:   hasLeft({ characterName, historyKey }: {
/opt/docker/tg-bot-ts-dev/src/systems/leaves.ts:91:     historyKey:    TGKey;
/opt/docker/tg-bot-ts-dev/src/systems/leaves.ts:93:     return _data[characterName]?.history.some((r) => r.historyKey === historyKey) ?? false;
/opt/docker/tg-bot-ts-dev/src/systems/tg.ts:10: *   TG.getAttendance({ historyKey })
/opt/docker/tg-bot-ts-dev/src/systems/tg.ts:68:   getAttendance({ historyKey, nation }: {
/opt/docker/tg-bot-ts-dev/src/systems/tg.ts:69:     historyKey: TGKey;
/opt/docker/tg-bot-ts-dev/src/systems/tg.ts:72:     const players = Attendance.players(historyKey);
/opt/docker/tg-bot-ts-dev/src/systems/tg.ts:78:   allSubmitted(historyKey: TGKey): boolean {
/opt/docker/tg-bot-ts-dev/src/systems/tg.ts:79:     return Attendance.allSubmitted(historyKey);
/opt/docker/tg-bot-ts-dev/src/ui/types.ts:15:   historyKey?:       TGKey;
/opt/docker/tg-bot-ts-dev/src/ui/types.ts:21:   historyKey?:      TGKey;
/opt/docker/tg-bot-ts-dev/src/ui/poll/layouts.bak/default.ts:60:   if (entry.userKey && context.historyKey) {
/opt/docker/tg-bot-ts-dev/src/ui/poll/layouts.bak/default.ts:61:    if (Leaves.hasLeft({ characterName: entry.characterName!, historyKey: context.historyKey })) {
/opt/docker/tg-bot-ts-dev/src/ui/poll/layouts.bak/default.ts:75:   options?: { showNationEmoji?: boolean; historyKey?: string }
/opt/docker/tg-bot-ts-dev/src/ui/poll/layouts.bak/default.ts:88:    historyKey:      options?.historyKey,
/opt/docker/tg-bot-ts-dev/src/ui/poll/layouts.bak/side-by-side.ts:57:   if (entry.userKey && entry.characterName && context.historyKey) {
/opt/docker/tg-bot-ts-dev/src/ui/poll/layouts.bak/side-by-side.ts:58:    if (Leaves.hasLeft({ characterName: entry.characterName, historyKey: context.historyKey })) {
/opt/docker/tg-bot-ts-dev/src/ui/poll/layouts.bak/side-by-side.ts:71:   options?: { showNationEmoji?: boolean; historyKey?: string }
/opt/docker/tg-bot-ts-dev/src/ui/poll/layouts.bak/side-by-side.ts:82:    historyKey:      options?.historyKey,
/opt/docker/tg-bot-ts-dev/src/ui/poll/layouts.bak/side-by-side.ts:93:   historyKey?: string
/opt/docker/tg-bot-ts-dev/src/ui/poll/layouts.bak/side-by-side.ts:95:   const context   = buildContext(yesEntries, nation, { historyKey });
/opt/docker/tg-bot-ts-dev/src/ui/poll/layouts.bak/side-by-side.ts:138:   const historyKey = `${new Date().toISOString().slice(0, 10)}-${state.slot}`;
/opt/docker/tg-bot-ts-dev/src/ui/poll/layouts.bak/side-by-side.ts:162:         value:  formatNationField(Nation.Capella, yesByNation[Nation.Capella], noVoters, showNoInline, historyKey),
/opt/docker/tg-bot-ts-dev/src/ui/poll/layouts.bak/side-by-side.ts:167:         value:  formatNationField(Nation.Procyon, yesByNation[Nation.Procyon], noVoters, showNoInline, historyKey),
/opt/docker/tg-bot-ts-dev/src/ui/poll/base-layout.ts:74:   if (entry.characterName && context.historyKey) {
/opt/docker/tg-bot-ts-dev/src/ui/poll/base-layout.ts:75:     if (Leaves.hasLeft({ characterName: entry.characterName, historyKey: context.historyKey })) {
/opt/docker/tg-bot-ts-dev/src/ui/poll/base-layout.ts:88:   options?: { showNationEmoji?: boolean; historyKey?: TGKey }
/opt/docker/tg-bot-ts-dev/src/ui/poll/base-layout.ts:106:     historyKey:      options?.historyKey,
/opt/docker/tg-bot-ts-dev/src/ui/poll/base-layout.ts:117:   historyKey?: TGKey
/opt/docker/tg-bot-ts-dev/src/ui/poll/base-layout.ts:119:   const context   = buildContext(yesEntries, nation, { historyKey });
/opt/docker/tg-bot-ts-dev/src/ui/poll/base-layout.ts:205:     const historyKey = options?.historyKey
/opt/docker/tg-bot-ts-dev/src/ui/poll/base-layout.ts:206:        ?? TGKey.current({ slot: state.slot });
/opt/docker/tg-bot-ts-dev/src/ui/poll/base-layout.ts:228:           value:  formatNationField(Nation.Capella, yesByNation[Nation.Capella], noVoters, showNoInline, historyKey),
/opt/docker/tg-bot-ts-dev/src/ui/poll/base-layout.ts:233:           value:  formatNationField(Nation.Procyon, yesByNation[Nation.Procyon], noVoters, showNoInline, historyKey),
/opt/docker/tg-bot-ts-dev/src/ui/poll/base-layout.ts:242:           value:  formatNationField(Nation.Capella, yesByNation[Nation.Capella], noVoters, showNoInline, historyKey),
/opt/docker/tg-bot-ts-dev/src/ui/poll/base-layout.ts:248:           value:  formatNationField(Nation.Procyon, yesByNation[Nation.Procyon], noVoters, showNoInline, historyKey),