Skip to content

fix: fixed trailing = false bug + added tests#688

Merged
euvinkeel merged 4 commits intomainfrom
users/euvinkeel/throttledfunction-trailing
Apr 29, 2026
Merged

fix: fixed trailing = false bug + added tests#688
euvinkeel merged 4 commits intomainfrom
users/euvinkeel/throttledfunction-trailing

Conversation

@euvinkeel
Copy link
Copy Markdown
Collaborator

@euvinkeel euvinkeel commented Apr 29, 2026

(tests and test files all by GPT-5.5, seems to work)
(set place files to 0 cause i don't want them overwriting existing places and idk how open cloud works)

(tests and test files all by GPT-5.5, seems to work)
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 29, 2026

Test Results

Package Status Try it
@quenty/throttle ✅ Passed (5/5) (48.4s) Open in Roblox
@quenty/rx ✅ Passed (3/3) (48.4s) Open in Roblox
@quenty/ik ✅ Passed (3/3) (48.4s) Open in Roblox
@quenty/rogue-humanoid ✅ Passed (48.4s) Open in Roblox
@quenty/rogue-properties ✅ Passed (2/2) (48.4s) Open in Roblox
@quenty/soundgroup ✅ Passed (4/4) (48.4s) Open in Roblox
@quenty/gameproductservice ✅ Passed (48.4s) Open in Roblox
@quenty/animations ✅ Passed (8/8) (48.4s) Open in Roblox
@quenty/chatproviderservice ✅ Passed (3/3) (48.4s) Open in Roblox
@quenty/conditions ✅ Passed (48.4s) Open in Roblox
@quenty/gameconfig ✅ Passed (48.4s) Open in Roblox
@quenty/settings ✅ Passed (5/5) (48.4s) Open in Roblox
@quenty/settings-inputkeymap ✅ Passed (1/1) (48.4s) Open in Roblox
@quenty/tie ✅ Passed (5/5) (48.4s) Open in Roblox
@quenty/fakeskybox ✅ Passed (3/3) (48.4s) Open in Roblox
@quenty/snackbar ✅ Passed (3/3) (48.4s) Open in Roblox
@quenty/deathreport ✅ Passed (4/4) (48.4s) Open in Roblox
@quenty/blend ✅ Passed (3/3) (48.4s) Open in Roblox
@quenty/camera ✅ Passed (8/8) (48.4s) Open in Roblox
@quenty/inputkeymaputils ✅ Passed (6/6) (48.4s) Open in Roblox
@quenty/observablecollection ✅ Passed (204/204) (48.4s) Open in Roblox
@quenty/cmdrservice ✅ Passed (48.4s) Open in Roblox
@quenty/secrets ✅ Passed (2/2) (48.4s) Open in Roblox
@quenty/clipcharacters ✅ Passed (1/1) (48.4s) Open in Roblox
@quenty/permissionprovider ✅ Passed (2/2) (48.4s) Open in Roblox
@quenty/datastore ✅ Passed (3/3) (48.4s) Open in Roblox
@quenty/roblox-api-dump ✅ Passed (32/33) (48.4s) Open in Roblox
@quenty/screenshothudservice ✅ Passed (48.4s) Open in Roblox
@quenty/influxdbclient ✅ Passed (9/9) (48.4s) Open in Roblox

29 tested, 29 passed, 0 failed in 48.4s · View logs

Deploy Results

Package Status Try it
@quenty/integration ✅ Deployed (35.9s) Open in Roblox

1 deployed, 1 passed, 0 failed in 35.9s · View logs

(since they also relied on scheduler delays)
and i could make it so you could cd into test and get the tests to run, but i don't want to make a test method that isn't completely in line with the CI/CD flow and the nevermore test flow because it's probably all very specific so i'm just going to remove everything tested here cause those tests were generated anyway
@euvinkeel
Copy link
Copy Markdown
Collaborator Author

euvinkeel commented Apr 29, 2026

(did not want tests that rely on scheduler delays to impact future nevermore test runs)
(for studio-only tests, can't make a nevermore test flow that is studio only and not cloud, requires a universe and place id and --cloud runs are automatic for PRs)
(an alternative is to cd directly into the test directory and rojo serve then run in studio manually without any deploy.nevermore.json file at all, but idk if that will also screw with nevermore cli or CI/CD assumptions, so i just removed tests after verifying correct behavior)


function ThrottledFunction._scheduleTrailing<T...>(self: ThrottledFunction<T...>, delayTime: number, ...: T...)
self._trailingValue = table.pack(...)
task.delay(delayTime, function()
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

we should probably track this task and cancel it "if-and-only-if" it hasn't dispatched yet.

@Quenty
Copy link
Copy Markdown
Owner

Quenty commented Apr 29, 2026

feel free to add tests, and then use jest.useFakeTimers()

end

-- If leading = true, will enable dispatching immediately upon the creation of this ThrottledFunction.
-- Else, will have to wait <timeout> seconds before it calls with the latest-called args.
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

should put this in a luau doc comments maybe?

thanks gpt for helping me out with jest : )
thanks gpt for helping me out with moonwave conventions : ))
@euvinkeel euvinkeel merged commit 25824a8 into main Apr 29, 2026
9 checks passed
@Quenty
Copy link
Copy Markdown
Owner

Quenty commented Apr 29, 2026

🚀 PR was released in @quenty/actionmanager@13.32.1, @quenty/adorneeboundingbox@8.36.1, @quenty/adorneedata@7.33.1, @quenty/adorneevalue@10.35.1, @quenty/aggregator@1.15.1, @quenty/animationprovider@11.35.1, @quenty/animations@8.31.1, @quenty/assetserviceutils@5.31.1, @quenty/attributeutils@14.29.1, @quenty/avatareditorutils@7.37.1, @quenty/basicpane@13.30.1, @quenty/binder@14.34.1, @quenty/bindtocloseservice@8.30.1, @quenty/blend@12.34.1, @quenty/bodycolorsutils@7.34.1, @quenty/boundlinkutils@14.35.1, @quenty/brine@1.1.1, @quenty/brio@14.29.1, @quenty/buttondragmodel@1.29.1, @quenty/buttonhighlightmodel@14.34.1, @quenty/camera@14.38.1, @quenty/camerastoryutils@10.19.1, @quenty/characterutils@12.31.1, @quenty/chatproviderservice@9.48.1, @quenty/clienttranslator@14.35.1, @quenty/clipcharacters@12.37.1, @quenty/cmdrservice@13.41.1, @quenty/collectionserviceutils@8.30.1, @quenty/color3utils@11.34.1, @quenty/colorpalette@10.37.1, @quenty/colorpicker@10.35.1, @quenty/conditions@10.38.1, @quenty/contentproviderutils@12.30.1, @quenty/cooldown@11.36.1, @quenty/coreguienabler@12.32.1, @quenty/counter@7.30.1, @quenty/datastore@13.37.1, @quenty/deathreport@10.41.1, @quenty/depthoffield@11.36.1, @quenty/elo@7.35.1, @quenty/enabledmixin@11.25.1, @quenty/equippedtracker@13.32.1, @quenty/fakeskybox@11.16.1, @quenty/firstpersoncharactertransparency@14.32.1, @quenty/flipbook@9.30.1, @quenty/friendutils@12.29.1, @quenty/funnels@1.22.1, @quenty/gameconfig@12.45.1, @quenty/gameproductservice@14.47.1, @quenty/gamescalingutils@13.34.1, @quenty/genericscreenguiprovider@13.37.1, @quenty/guivisiblemanager@12.22.1, @quenty/hide@11.36.1, @quenty/highlight@10.38.1, @quenty/hintscoringutils@14.39.1, @quenty/humanoidspeed@12.46.1, @quenty/humanoidtracker@13.30.1, @quenty/humanoidutils@2.12.1, @quenty/idleservice@13.47.1, @quenty/ik@15.48.1, @quenty/influxdbclient@7.33.1, @quenty/inputkeymaputils@14.41.1, @quenty/inputmode@13.32.1, @quenty/inputobjectutils@4.29.1, @quenty/instanceutils@13.29.1, @quenty/linkutils@13.29.1, @quenty/lipsum@14.34.1, @quenty/localizedtextutils@12.29.1, @quenty/messagingserviceutils@7.20.1, @quenty/modeltransparencyeffect@11.15.1, @quenty/motor6d@7.40.1, @quenty/multipleclickutils@13.28.1, @quenty/observablecollection@12.36.1, @quenty/overriddenproperty@10.14.1, @quenty/particleengine@13.31.1, @quenty/parttouchingcalculator@14.38.1, @quenty/permissionprovider@14.35.1, @quenty/physicsutils@8.28.1, @quenty/playerbinder@14.34.1, @quenty/playerhumanoidbinder@14.35.1, @quenty/playerinputmode@9.36.1, @quenty/playerutils@8.31.1, @quenty/promptqueue@1.35.1, @quenty/propertyvalue@7.29.1, @quenty/qframe@10.20.1, @quenty/r15utils@13.30.1, @quenty/racketingropeconstraint@12.40.1, @quenty/radial-image@9.35.1, @quenty/ragdoll@15.47.1, @quenty/receiptprocessing@7.32.1, @quenty/remoting@12.31.1, @quenty/resetservice@11.35.1, @quenty/rigbuilderutils@10.32.1, @quenty/roblox-api-dump@8.20.1, @quenty/rogue-humanoid@10.46.1, @quenty/rogue-properties@11.43.1, @quenty/rx@13.28.1, @quenty/rxbinderutils@14.34.1, @quenty/rxsignal@7.28.1, @quenty/scoredactionservice@16.42.1, @quenty/screenshothudservice@7.32.1, @quenty/seatutils@7.33.1, @quenty/secrets@7.46.1, @quenty/selectionutils@8.30.1, @quenty/settings-inputkeymap@10.52.2, @quenty/settings@11.49.2, @quenty/snackbar@11.39.1, @quenty/softshutdown@9.45.1, @quenty/soundgroup@1.38.1, @quenty/soundplayer@7.37.1, @quenty/spawning@10.43.1, @quenty/sprites@13.28.1, @quenty/statestack@14.31.1, @quenty/sunpositionutils@2.5.1, @quenty/teamtracker@13.30.1, @quenty/teamutils@10.30.1, @quenty/teleportserviceutils@9.30.1, @quenty/templateprovider@11.35.1, @quenty/textboxutils@7.28.1, @quenty/textfilterservice@13.31.1, @quenty/textserviceutils@13.34.1, @quenty/throttle@10.12.1, @quenty/tie@10.38.1, @quenty/timedtween@7.34.1, @quenty/timesyncservice@13.32.1, @quenty/toolutils@1.15.1, @quenty/transitionmodel@7.36.1, @quenty/ugcsanitize@1.16.1, @quenty/uiobjectutils@6.28.1, @quenty/undostack@7.30.1, @quenty/userserviceutils@9.30.1, @quenty/valuebaseutils@13.29.1, @quenty/valueobject@13.30.1, @quenty/viewport@11.39.1 🚀

@Quenty Quenty added the released This issue/pull request has been released. label Apr 29, 2026
@euvinkeel
Copy link
Copy Markdown
Collaborator Author

euvinkeel commented Apr 29, 2026

just realized the docs have some sentence that cuts off but i don't want to branch and pr and release and ci/cd again just to fix that doc comment

image

(unless i should?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released This issue/pull request has been released.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants