Skip to content

Add compact authenticated overview API for bot and lightweight clients #36

@tiankaima

Description

@tiankaima

Problem

The bot's overview command has to assemble a user-facing daily summary by making several independent calls: schedules, todos, subscribed homeworks, current subscription/exams, then filtering and sorting locally.

This duplicates logic already present in server-side dashboard/MCP helpers and causes unnecessary round trips for a common lightweight client use case.

Proposed server-side feature

Add a compact authenticated overview endpoint, for example:

GET /api/me/overview?atTime=...&homeworkWindowDays=7&limit=3

Response should include the current user's:

  • today schedules,
  • pending todos,
  • due-soon homeworks,
  • upcoming exams,
  • counts plus top N formatted/raw items suitable for lightweight clients.

This should be smaller than the full dashboard payload and stable enough for bots/CLI/mobile clients.

References

Server already has similar logic in MCP get_my_overview / dashboard helpers under src/lib/mcp/tools/my-data-tools.ts and src/features/home/server/*dashboard*.

Bot currently assembles this in internal/commands/commands.go overview, formatOverview, and dueSoonHomeworks.

Acceptance criteria

  • One authenticated REST call returns the bot's current overview data.
  • Supports anchoring to a specific time/day for testing and natural-language requests.
  • Uses server-side subscription/homework/todo/exam read models instead of client fan-out.
  • OpenAPI/schema docs are updated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions