Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
f12f61c
day1
Miodec Nov 30, 2025
c6feb6b
asdf
Miodec Nov 30, 2025
7ab1967
round to 2 for comparing new vs old
Miodec Nov 30, 2025
e7e050d
force release fix
Miodec Nov 30, 2025
fa8284c
fix last word
Miodec Nov 30, 2025
34dda0e
fix log
Miodec Nov 30, 2025
1ac28e1
wpm history
Miodec Nov 30, 2025
f87bff3
test data
Miodec Nov 30, 2025
77471e6
wip
Miodec Dec 1, 2025
f98dfb7
Merge branch master into test-events-2
Miodec May 20, 2026
5cbedd7
fix merge
Miodec May 20, 2026
ee21f86
various fixes
Miodec May 20, 2026
bc8b128
count spaces after incorrect words
Miodec May 20, 2026
572caf3
Merge branch 'master' into test-events-2
Miodec May 20, 2026
9597c33
wpmcons
Miodec May 20, 2026
81883e2
move
Miodec May 20, 2026
68def97
remove
Miodec May 20, 2026
f14db87
round
Miodec May 20, 2026
4011799
delete
Miodec May 21, 2026
55419a5
tests
Miodec May 21, 2026
2d7d794
tests
Miodec May 22, 2026
5c4e661
for debugging
Miodec May 22, 2026
a80442f
refactor: enhance event handling and timing calculations in stats module
Miodec May 22, 2026
2e94ec9
why was this here
Miodec May 22, 2026
56c1543
fix wpm calc
Miodec May 22, 2026
af4bed6
unused
Miodec May 22, 2026
dea630a
reduce duplication
Miodec May 22, 2026
c7aabe3
afk duration
Miodec May 22, 2026
0abbeee
Merge branch 'master' into test-events-2
Miodec May 22, 2026
bfd4bdf
timer events
Miodec May 22, 2026
53b753d
cache
Miodec May 22, 2026
9b9ed62
Merge branch 'master' into test-events-2
Miodec May 23, 2026
90f2871
control if merging is used
Miodec May 23, 2026
6141fc5
cleanup
Miodec May 23, 2026
3688782
zen
Miodec May 23, 2026
0535ac6
dont clear in zen
Miodec May 23, 2026
6408970
move functions
Miodec May 23, 2026
0e8152f
refactor
Miodec May 23, 2026
f1c9a2f
yeet
Miodec May 23, 2026
0078aa3
data tests
Miodec May 23, 2026
35bfafd
tests
Miodec May 23, 2026
c58537b
type safety
Miodec May 24, 2026
dfb9edd
yes
Miodec May 24, 2026
f888c51
enhance event logging for NoCode key events and improve keyup handling
Miodec May 24, 2026
d24f5f2
yeet
Miodec May 24, 2026
31612c2
use keydown
Miodec May 26, 2026
1868bd4
inline logic
Miodec May 26, 2026
4517155
tests
Miodec May 26, 2026
2c8f4f4
test count chars
Miodec May 26, 2026
8a329b3
Merge branch 'master' into test-events-2
Miodec May 26, 2026
ad7571c
fix: update keydown and keyup event logging to use getTestEventCode
Miodec May 26, 2026
b28d9e6
iscompositionending
Miodec May 26, 2026
9093df5
composition events
Miodec May 26, 2026
9ccbc14
rename
Miodec May 27, 2026
c2bcb8a
merge composition
Miodec May 27, 2026
5873fb7
yeet repeat
Miodec May 27, 2026
7ba32fd
fix multiline
Miodec May 27, 2026
9198f76
rounding
Miodec May 27, 2026
8848fbb
fix
Miodec May 27, 2026
fe89a72
show if all matched or what didnt
Miodec May 27, 2026
42ed4eb
ditch events before test start
Miodec May 27, 2026
6a786fe
ignore pre-start keydowns in keypress overlap calculation
Miodec May 27, 2026
bade7d2
chore: don't add extra data point if remainder of test duration is le…
Miodec May 27, 2026
60b4929
handle stopped inputs
Miodec May 27, 2026
f737f09
test: add unit tests for getTimerBoundaries function
Miodec May 27, 2026
1a26679
remove log
Miodec May 27, 2026
19caa73
remove
Miodec May 27, 2026
7d34adc
test: add case for last incorrect partial word in countChars function
Miodec May 27, 2026
5345fb5
round time
Miodec May 27, 2026
95a7a17
include input events in afk calculation
Miodec May 27, 2026
2752e47
break on last word
Miodec May 27, 2026
f7f403f
test: add event filtering for pre-start and post-end scenarios
Miodec May 27, 2026
197cfc8
move input event up
Miodec May 27, 2026
7918f3d
reorder
Miodec May 27, 2026
a03adab
reafactoooor
Miodec May 27, 2026
3dd608d
yeet
Miodec May 27, 2026
5e7e9aa
ignore keydown when result is calculating
Miodec May 28, 2026
b88fc8f
Merge branch 'master' into test-events-2
Miodec May 28, 2026
6340405
fix
Miodec May 28, 2026
aafeaa0
fix tests
Miodec May 28, 2026
7626cb9
fix words mode
Miodec May 28, 2026
1e0da3b
round when comparing
Miodec May 28, 2026
d576617
compare keypresses per second instead of burst since its calculated d…
Miodec May 28, 2026
8051a33
ignore consistency
Miodec May 28, 2026
fe4a481
Merge branch 'master' into test-events-2
Miodec May 28, 2026
7d6c9a7
report
Miodec May 28, 2026
530044c
yeet
Miodec May 28, 2026
dee558a
remove notifications
Miodec May 28, 2026
e22ce49
remove logs
Miodec May 28, 2026
bc77b23
remove
Miodec May 28, 2026
a45f726
dont log
Miodec May 28, 2026
9070088
remove todo
Miodec May 28, 2026
208b4a2
prefer spread
Miodec May 28, 2026
39acc20
fix, tests
Miodec May 28, 2026
3511bc2
remove
Miodec May 28, 2026
0827e9a
typo
Miodec May 28, 2026
d06f40a
yeet logs
Miodec May 28, 2026
463921e
stronger type
Miodec May 28, 2026
0f96f69
unnecessary
Miodec May 28, 2026
0e0295e
only call when authenticated
Miodec May 28, 2026
41d1118
merge tests
Miodec May 28, 2026
1d5a226
remove unknown
Miodec May 28, 2026
dc487e0
rebuild on cleanup
Miodec May 28, 2026
9482148
return 0
Miodec May 28, 2026
1a35c5c
reset
Miodec May 28, 2026
6d7cce5
strict schema
Miodec May 29, 2026
6b5be8f
catch
Miodec May 29, 2026
0ffa96a
dont throw
Miodec May 29, 2026
2182d3c
fix tests
Miodec May 29, 2026
982c8b3
refactor test definition
Miodec May 29, 2026
66283e9
use function
Miodec May 29, 2026
227f21f
tests
Miodec May 29, 2026
5a65647
tests
Miodec May 29, 2026
6ef2b9f
Merge branch 'master' into test-events-2
Miodec May 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions backend/src/api/controllers/result.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import {
GetResultsResponse,
UpdateResultTagsRequest,
UpdateResultTagsResponse,
ReportCompletedEventMismatchRequest,
} from "@monkeytype/contracts/results";
import {
CompletedEvent,
Expand Down Expand Up @@ -184,6 +185,20 @@ export async function updateTags(
});
}

export async function reportCompletedEventMismatch(
req: MonkeyRequest<undefined, ReportCompletedEventMismatchRequest>,
): Promise<MonkeyResponse> {
const { uid } = req.ctx.decodedToken;
const { notMatching } = req.body;
// Logger.warning(
// `Completed event mismatch for uid ${uid}: ${notMatching.join(", ")}`,
// );
// Logger.warning(`Old CE: ${JSON.stringify(ce)}`);
// Logger.warning(`New CE: ${JSON.stringify(ce2)}`);
void addLog("completed_event_mismatch", { notMatching }, uid);
Comment thread
Miodec marked this conversation as resolved.
return new MonkeyResponse("Mismatch reported", null);
}

export async function addResult(
req: MonkeyRequest<undefined, AddResultRequest>,
): Promise<AddResultResponse> {
Expand Down
4 changes: 4 additions & 0 deletions backend/src/api/routes/results.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ export default s.router(resultsContract, {
updateTags: {
handler: async (r) => callController(ResultController.updateTags)(r),
},
reportCompletedEventMismatch: {
handler: async (r) =>
callController(ResultController.reportCompletedEventMismatch)(r),
},
deleteAll: {
handler: async (r) => callController(ResultController.deleteAll)(r),
},
Expand Down
Loading
Loading