Skip to content
Source
Docs
Explore
Skills
MCP servers
For agents
Search or jump to…
Sign in
Sign up
pingdotgg
/
t3code
Pull requests
pingdotgg
t3code
Public
Synced with GitHub
Popular #1
Fork
0
0
0
0
1
2
3
4
5
6
7
8
9
Code
Architecture
Issues
Pull requests
Community
Assets
CI
Agents
Settings
fix(server): save advanced background activity settings
#23342
Send to my agent
Closed
juliusmarminge
wants to merge 3 commits into
main
from
fix/issue-17233
·
opened
last month
View on GitHub
Conversation
4
Commits
3
Files changed
2
Impact
Showing
2 changed files
with
33 additions
and
1 deletion
.
x
0 of 2 viewed, 2 left
Files
Hide whitespace
Unified
Split
29 additions and 0 deletions
+29
-0
apps/server/src/auth/RpcAuthorization.test.ts
Modified
Diff
Before/After
Viewed
apps/server/src/auth/RpcAuthorization.test.ts
View file
Show all 15 lines
@@ -16,6 +16,7 @@
16
16
WsRpcGroup
,
17
17
}
from
"@t3tools/contracts"
;
18
18
import
{ describe, expect, it }
from
"@effect/vitest"
;
19
+
import
*
as
Duration
from
"effect/Duration"
;
19
20
import
*
as
Effect
from
"effect/Effect"
;
20
21
import
*
as
Layer
from
"effect/Layer"
;
21
22
import
*
as
Stream
from
"effect/Stream"
;
Expand up
Expand down
Show all 149 lines
@@ -171,6 +172,34 @@
171
172
}).
pipe
(
Effect
.
scoped
),
172
173
);
173
174
175
+
// The RPC server hands middleware the decoded payload, so durations arrive as Duration values.
176
+
it.
effect
(
"authorizes background activity overrides with decoded duration intervals"
, () =>
177
+
Effect
.
gen
(
function
* () {
178
+
const
client =
yield
*
RpcTest
.
makeClient
(group).
pipe
(
179
+
Effect
.
provide
(
180
+
Layer
.
mergeAll
(
181
+
group.
toLayerHandler
(
WS_METHODS
.
serverUpdateSettings
, () =>
182
+
Effect
.
succeed
(
DEFAULT_SERVER_SETTINGS
),
183
+
),
184
+
RpcAuthorization
.
layer
([
AuthSettingsWriteScope
]),
185
+
),
186
+
),
187
+
);
188
+
const
settings =
yield
* client[
WS_METHODS
.
serverUpdateSettings
]({
189
+
patch
: {
190
+
backgroundActivity
: {
191
+
profile
:
"custom"
,
Home
Search
Explore
Menu