Preface¶
After the DSH host process starts, there is no interface inside the container. Daily tasks such as “clocking in for work, checking how long you have worked today, and calculating the lateness rate at the end of the month” have no place to land. To record such activities, the common approach is to write scripts and files yourself and then manually summarize them periodically; scripts will not provide reminders, nor will they calculate holidays and make-up work days.
The plugin introduced below, mryouyouHK/youyou-work-hours, integrates a time-tracking panel into the DSH client sidebar. By hovering over the “Timer” item on the left, you can clock in, view today’s working hours and lateness rate. The data stays in the local browser, accompanied by three view modes: calendar, yearly, and list for review.
This is a community plugin, not an official DeepSeek application. The directory site SkillHub also has no official affiliation with DeepSeek or Fenghuang.
What is this¶
One-sentence positioning: A DSH client plugin that provides clock-in/out, configurable shift times, today’s and average work hour statistics, three review records (calendar/year/list), and timeout reminders based on the notification center.
Maintainer is mryouyouHK, repository URL https://github.com/mryouyouHK/youyou-work-hours, MIT License. In package.json, name is youyou-work-hours, version is 1.1.0.
Problem solved: Transforms time tracking from “scripts + manual summary” into a panel in the client with reminders and holiday-adjusted metrics, while retaining local storage and avoiding server uploads.
Core Features¶
Sidebar “Timer” Overlay¶
When hovering over the “Timer” item on the left, a floating layer opens on the right side of the sidebar, with a style consistent with the “API Balance” menu. It contains four rows and two columns of content:
- First row: Planned Start / Clock In
- Second row: Planned End / Clock Out
- Third row: Today’s Hours / Monthly Average Hours
- Fourth row: Monthly Lateness Rate / Weekly Lateness Rate
At the bottom are two quick clock-in buttons. Clicking anywhere outside the floating layer (including the “Timer” item itself) or pressing Esc closes it; clicking a quick clock-in button saves the record and closes the floating layer.
Configurable Time and Reminders¶
All judgment times can be changed in the panel “Settings”. The default values given in the README are as follows:
计划上班时间 09:00 显示计划班次;未打卡时侧栏提示
Planned Start Time 09:00 Shows planned shift; sidebar hint when not clocked in
计划下班时间 18:00 预计下班时间、超时倒计时的基准;某天可在面板里单独覆盖
Planned End Time 18:00 Base for estimated end time and overtime countdown; can be overridden individually in the panel for a specific day
迟到判定时间 10:00 晚于该时间上班记为迟到(只统计周一至周五)
Lateness Judgment Time 10:00 Clocking in after this time is recorded as late (Mon-Fri only)
超时提示时间 19:30 过了该时间,侧栏「计时」条目红色呼吸底色
Overtime Alert Time 19:30 After this time, the sidebar "Timer" item has a red pulsing background
下班提示时间 20:00 过了该时间,会话顶部出现打卡提醒条
End Time Alert 20:00 After this time, a clock-in reminder bar appears at the top of the session
下班提醒条 开启 关掉后超过下班提示时间也不再显示提醒条
End Time Alert Bar Enabled if turned off, no reminder bar will appear after the End Time Alert time
下班提醒条文案 可配置 {time} 会替换成已过时长
End Time Alert Bar Text Configurable {time} will be replaced by the elapsed duration
超时爆闪间隔 5 分钟 超过预计下班后每隔这么久短促爆闪一次(1–60)
Overtime Flash Interval 5 minutes Short flashes every so often after the estimated end time (1-60)
超时爆闪提示文案 可配置 爆闪时通知中心显示的正文(最多 120 字)
Overtime Flash Alert Text Configurable body text shown in notification center during flash (max 120 chars)
Clock in, clock out, and daily planned end time can all be manually edited; times are displayed in 24-hour format. When not set separately, the estimated end time is calculated based on the global “Planned End Time”.
“Settings” is collapsed by default. Click the title to expand and modify. Changes are saved as a local draft first; only when “Save Settings” is clicked are they written. A toast prompt appears on successful save; “Unsaved” is displayed next to the title if not saved.
Metrics for Work Hours and Average Hours¶
The metrics here are prone to calculation errors; written down for verification:
- Cumulative hours are calculated based on elapsed time from clock-in to current time or clock-out, excluding rest time.
- Average hours = Total duration of completed hours in that month ÷ Number of days with completed hours in that month. When not clocked out for the day, real-time hours are included in “Total Hours” but not in the average, to avoid the average being dragged down in the morning and jumping high after clocking out.
- Lateness days only count dates where both clock-in and clock-out times are fully filled in; incomplete dates are not counted in the denominator for lateness.
- Lateness rate is only calculated on workdays: the denominator is the number of workdays with completed hours. Clocking in on weekends is recorded as normal hours but does not count towards lateness days or lateness rate. The percentage in parentheses after the lateness days is the rate.
The panel has four cards at the top: Today’s Cumulative Hours, Estimated End Time Countdown, Monthly Average Hours, and Yearly Average Hours.
Three Record Views¶
- Calendar: Displays a grid by month, showing hours and status (Late / On Time / In Progress) for each day. Saturday and Sunday have a light gray background. Legal holidays show the holiday name with a warm background; make-up work days (rest days) are labeled “Work”. Clicking a day expands its details below; clicking “Edit” (or double-clicking any time) enters edit mode, and clicking “Save” prompts a successful save message.
- Year View: 12 month cards, each showing the month’s “Average/Day”, total hours, attendance days, and lateness days, listing specific late dates; clicking a month switches to that month’s calendar details.
- List: Displays and edits clock-in, planned end, and clock-out times row by row in a monthly table.
The three views can be switched at any time. The “Today / This Year” button returns to the current time.
Legal Holidays¶
Built-in holiday arrangements published by the General Office of the State Council for 2025-2026. Holidays are treated as non-workdays (not counted as late, not included in the lateness rate denominator). Make-up work days (rest days) are treated as workdays. New arrangements from 2027 onwards require updating the holiday table in the code.
Installation and Enablement¶
The README does not provide a single shell command to copy, but clearly states the integration method:
使用 Harness plugin_manager 的 install_bundle 指向本目录。
Host 端插件重新启用或重启 Harness 后生效;客户端刷新页面即可。
The specific path is the repository root directory. In package.json, dsh.bundle.patch points to ./cordis.patch.yml, and dsh.client declares the platform as web, immediately: true, and injects three client UI packages:
{
"dsh": {
"bundle": { "patch": "./cordis.patch.yml" },
"client": {
"platform": "web",
"immediately": true,
"inject": [
"@deepseek-ai/dsh-client-ui-layout",
"@deepseek-ai/dsh-client-ui-sidebar",
"@deepseek-ai/dsh-client-ui-chat"
]
}
}
}
There is no command in the form of dsh plugin add; do not concatenate the repository name directly into an installation command. Before integrating, open the repository root directory to confirm the directory structure and package.json, and verify compatibility with your local Harness version.
Data Storage Location¶
Check-in records and all settings are saved by default only in the local browser’s localStorage, with the key work-hours:data:v1, and are not uploaded to any server. For backup or changing devices, use “Export Config” in “Settings” to get a JSON file, and then use “Import Config” to restore it; “Restore Default Times” only resets settings and does not delete check-in records.
Debugging and Testing¶
The “Debug Mode” at the bottom of the panel allows previewing the end time countdown, overtime flash, overtime red alert, and end time alert bar separately. Only one case runs at a time. Clicking “Close” on the current case clears the simulation and returns to normal mode; the preview does not modify check-in records.
Each time overtime flashing is triggered, the notification center plugin is called to add a new “Overtime Alert” (using custom text), and a system notification is attempted to be displayed. If system notifications are unavailable, the notification center shows an in-app banner. Notifications are only triggered once at the start of each flashing cycle of the configured interval.
The repository comes with a test script:
node test/logic.test.mjs
Covers default values and fallback for invalid values, old data migration, total/average hours/lateness statistics, days in progress, missing clock-out, year view summary, import validation, and cache invalidation.
Applicable Scenarios and Precautions¶
Suitable for people who want to conveniently record clock-in/out in the DSH client and check average hours and lateness rates at the end of the month, especially scenarios where the client is used as the daily entry point and no additional independent clock-in tool is desired.
Precautions:
- The plugin runs with the permissions of the current DSH process. The range of directories and files it can read is equivalent to that process. Before installing, read the source code, confirm dependencies and patch content, and decide whether to enable it.
- Data is only in the local browser. Before switching browsers or clearing cache, export the configuration first, otherwise local records will be lost.
- Reminders depend on the notification center plugin. If not installed or if no system notifications are available, only an in-app banner will be displayed in the notification center.
- Holidays in 2027 and beyond require manually updating the holiday table in the code.
- The star count on the directory page is very low (current directory info is 0). It is a personal project. If you encounter issues, it is recommended to provide feedback via GitHub Issues.
Summary¶
The value of this plugin lies in integrating clock-in, shift determination, holiday metrics, and average hours into the DSH client sidebar, keeping data entirely local without needing additional services. The part that needs to be made clear is that it relies on client UI injection, the integration method is pointing install_bundle to the repository directory, and no command-line installation string is provided.
References:
- Directory Page: https://www.skillhub.cn/plugins/mryouyouHK/youyou-work-hours
- Repository: https://github.com/mryouyouHK/youyou-work-hours