Repository navigation
Feat/in game menu - #95
Maximus7474 merged 22 commits into
Conversation
Maximus7474
left a comment
There was a problem hiding this comment.
Appreciate the PR, seems like your agent took some liberties on the changes it's made. Report system is outof scope for this feature branch, UI implementation for in game is fine but the backend is still under discussion.
|
A pre-existing test and three additional tests added are currently failing. Test output646 | } as Response;
647 | }) as any;
648 |
649 | const response = await gameManager.dropPlayer(2, 'Exploiting Loop holes');
650 |
651 | expect(global.fetch).toHaveBeenCalledWith(
^
error: expect(received).toHaveBeenCalledWith(...expected)
[
"http://127.0.0.1:30120/fxManager/drop",
{
"body": "{"serverId":2,"reason":"Exploiting Loop holes"}",
"headers": {
"Application": "json/application",
"x-resource-token": "mock-token",
},
"method": "POST",
+ "signal": AbortSignal {},
},
]
- Expected - 0
+ Received + 1
at <anonymous> (~\fxManager\apps\core\src\modules\game\manager.test.ts:651:25)
✗ GameManager > dropPlayer() > should dispatch valid post payloads out to routing gateways and decode success structures perfectly
apps\resource\src\server\utils\query.test.ts:
18 | QueryManager({
19 | endpoint: '/stalled',
20 | method: 'POST',
21 | signal: AbortSignal.timeout(20),
22 | }),
23 | ).rejects.toThrow(/abort|timed out/i);
^
error:
Expected promise that rejects
Received promise that resolved: Promise { <resolved> }
at <anonymous> (~\fxManager\apps\resource\src\server\utils\query.test.ts:23:13)
✗ aborts an HTTP request when the core stops responding
apps\resource\src\client\modules\nui\quickmenu.test.ts:
22 | SetNuiFocus: (open: boolean) => focuses.push(open),
23 | SendNUIMessage: () => {},
24 | });
25 | const { setQuickMenuVisible } = await import('./quickmenu');
26 | test('closing a prompt after switching away never steals panel focus or restarts navigation', () => {
27 | setQuickMenuVisible(true);
^
TypeError: setQuickMenuVisible is not a function. (In 'setQuickMenuVisible(!0)', 'setQuickMenuVisible' is undefined)
at <anonymous> (~\fxManager\apps\resource\src\client\modules\nui\quickmenu.test.ts:27:2)
✗ closing a prompt after switching away never steals panel focus or restarts navigation
32 | callbacks.get('setDialogFocus')!({ open: false }, () => {});
33 | expect(focuses).toEqual([]);
34 | expect(ticks.size).toBe(0);
35 | });
36 | test('repeated dialog close events create only one navigation tick', () => {
37 | setQuickMenuVisible(true);
^
TypeError: setQuickMenuVisible is not a function. (In 'setQuickMenuVisible(!0)', 'setQuickMenuVisible' is undefined)
at <anonymous> (~\fxManager\apps\resource\src\client\modules\nui\quickmenu.test.ts:37:2)
✗ repeated dialog close events create only one navigation tickOn an additional note, (needs to be added to contributing guidelines by myself) please envelope tests in a root describe referring to the file and second one (if applicable) to the tested field. Otherwise the visual changes improve the objective wanted by the in game UI, would only request that the player list/search table be a shadcn component based table. |
-> mcok missing natives used in playerManager -> mock nativewrappers Vecrtor3
-> causes the abort signal to fire as it doesn't receive an answer
tags -> already displayed by a separate "health" bar
116a963
into
fxManagerProject:feat/in-game-menu
Damn, seemed fine for me, just saw this, thanks for fixing it king :) |
Description
Completes the in-game moderation panel with searchable players, permission-checked warn/kick/ban actions, and live player vitals.
Adds player name tags with health, armour and voice indicators, plus vehicle/death-aware blips. Implements persistent Reports with conversations, status management, staff permissions and access to players’ own reports.
Improves panel layout and keyboard focus, removes the tag preview button, and converts GTA’s native health values to a 0–100 display.
Security and performance fixes include callback validation and limits, protection against reused player IDs, HTTP timeouts, reliable polling and report database indexes.
Generative AI Disclosure
Note
Generative AI was used in creating this PR.
———
Tests
———
Additional Notes
Tested on a local Windows FiveM dev server, including Reports and moderation actions. Confirmed the health display shows 100/100 and the Preview Tags button is removed.