Skip to content

[settings] add work hours support#244

Open
capcom6 wants to merge 1 commit into
masterfrom
settings/work-hours-support
Open

[settings] add work hours support#244
capcom6 wants to merge 1 commit into
masterfrom
settings/work-hours-support

Conversation

@capcom6

@capcom6 capcom6 commented Jun 24, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features
    • Added configurable “work hours” settings to control when message delivery is permitted.
    • Introduced a new app:started webhook event for application startup notifications.
  • Documentation
    • Updated API/OpenAPI documentation to include the new work-hours fields and the app:started webhook event definition.

@coderabbitai coderabbitai Bot added the deployed The PR is deployed on staging label Jun 24, 2026
@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0050fc9f-659b-453f-9621-6c57de5a892b

📥 Commits

Reviewing files that changed from the base of the PR and between 0b4dd74 and e9065ee.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (3)
  • go.mod
  • internal/sms-gateway/modules/settings/utils.go
  • internal/sms-gateway/openapi/docs.go
✅ Files skipped from review due to trivial changes (2)
  • internal/sms-gateway/modules/settings/utils.go
  • internal/sms-gateway/openapi/docs.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • go.mod

📝 Walkthrough

Walkthrough

The PR adds work-hours fields to message settings maps and the OpenAPI schema, and bumps the client-go dependency.

Changes

Work Hours Settings

Layer / File(s) Summary
Work hours fields in settings rule maps
internal/sms-gateway/modules/settings/utils.go
rules["messages"] and rulesPublic["messages"] each gain work_hours_enabled, work_hours_start, and work_hours_end with empty-string defaults.
OpenAPI settings schema
internal/sms-gateway/openapi/docs.go
The OpenAPI smsgateway.SettingsMessages schema documents the three work-hours properties.

Client-go Dependency Update

Layer / File(s) Summary
client-go version bump
go.mod
The github.com/android-sms-gateway/client-go requirement changes from v1.14.0 to v1.14.1.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding work hours support to settings.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@internal/sms-gateway/openapi/docs.go`:
- Around line 2208-2219: The work_hours_end and work_hours_start fields in the
OpenAPI schema are defined as simple string types without any format validation,
which means generated clients and validators cannot enforce the HH:mm format
constraint mentioned in the descriptions. Add a pattern property to both the
work_hours_end and work_hours_start field definitions with a regex pattern that
validates the HH:mm format (24-hour), such as a pattern that matches two digits
for hours (00-23), a colon, and two digits for minutes (00-59). This will ensure
that API clients and validators can properly validate the time format at the
schema level.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a6e33db2-2172-407e-aa35-21b33ceed3e1

📥 Commits

Reviewing files that changed from the base of the PR and between 0126ab2 and a05068c.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (3)
  • go.mod
  • internal/sms-gateway/modules/settings/utils.go
  • internal/sms-gateway/openapi/docs.go

Comment thread internal/sms-gateway/openapi/docs.go
@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown

🤖 Pull request artifacts

Platform File
🐳 Docker GitHub Container Registry
🍎 Darwin arm64 server_Darwin_arm64.tar.gz
🍎 Darwin x86_64 server_Darwin_x86_64.tar.gz
🐧 Linux arm64 server_Linux_arm64.tar.gz
🐧 Linux i386 server_Linux_i386.tar.gz
🐧 Linux x86_64 server_Linux_x86_64.tar.gz
🪟 Windows arm64 server_Windows_arm64.zip
🪟 Windows i386 server_Windows_i386.zip
🪟 Windows x86_64 server_Windows_x86_64.zip

@capcom6 capcom6 added ready and removed deployed The PR is deployed on staging labels Jun 24, 2026
@capcom6 capcom6 force-pushed the settings/work-hours-support branch from a05068c to c5a9953 Compare June 25, 2026 00:23
@github-actions github-actions Bot removed the ready label Jun 25, 2026
@capcom6 capcom6 added the ready label Jun 25, 2026
@capcom6 capcom6 force-pushed the settings/work-hours-support branch from c5a9953 to d357a64 Compare June 26, 2026 23:36
@github-actions github-actions Bot removed the ready label Jun 26, 2026
@capcom6 capcom6 added the ready label Jun 28, 2026
@capcom6 capcom6 force-pushed the settings/work-hours-support branch from d357a64 to 0b4dd74 Compare June 30, 2026 00:31
@github-actions github-actions Bot removed the ready label Jun 30, 2026
@capcom6 capcom6 added the ready label Jun 30, 2026
@capcom6 capcom6 force-pushed the settings/work-hours-support branch from 0b4dd74 to 913f67d Compare July 2, 2026 02:19
@github-actions github-actions Bot removed the ready label Jul 2, 2026
@capcom6 capcom6 added the ready label Jul 2, 2026
@capcom6 capcom6 force-pushed the settings/work-hours-support branch from 913f67d to e9065ee Compare July 7, 2026 04:03
@github-actions github-actions Bot removed the ready label Jul 7, 2026
@capcom6 capcom6 added the ready label Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant