Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
5944452
fix: weather icon uses wrong time of day for wild
Mygod Mar 15, 2026
8cbf23e
chore(release): v1.41.0-develop.12 [skip ci]
semantic-release-bot Mar 15, 2026
b77145d
fix: change scan-on-demand dialog to notification
Mygod Mar 12, 2026
8acf245
fix(pokestops): align incident blocker visibility across markers and …
Mygod Mar 25, 2026
cf47297
Merge branch 'main' into develop
Mygod Mar 26, 2026
7907f30
Merge branch 'upstream/develop' into develop
Mygod Mar 26, 2026
13eced0
chore(release): v1.41.2-develop.1 [skip ci]
semantic-release-bot Mar 26, 2026
8dfbf6d
chore(deps): bump flatted from 3.3.3 to 3.4.2 (#1196)
dependabot[bot] Mar 26, 2026
10d0316
chore(deps): bump handlebars from 4.7.8 to 4.7.9 (#1198)
dependabot[bot] Mar 27, 2026
184eed6
chore(deps): bump handlebars from 4.7.8 to 4.7.9 (#1199)
dependabot[bot] Mar 27, 2026
b3004d5
chore(deps): bump @apollo/server from 5.4.0 to 5.5.0 (#1197)
dependabot[bot] Apr 2, 2026
f9774a1
chore(deps): bump lodash-es from 4.17.23 to 4.18.1 (#1202)
dependabot[bot] Apr 2, 2026
a242e84
fix: keep drawer scroll position
Mygod Apr 3, 2026
abc871d
chore: reorder pokestop features based on use of frequency
Mygod Apr 3, 2026
3670810
fix: properly set default discord auth as none
Mygod Apr 3, 2026
d6769c7
chore(release): v1.41.2-develop.2 [skip ci]
semantic-release-bot Apr 3, 2026
184ac2f
fix: weather update consistency
Mygod Apr 3, 2026
634f005
chore(release): v1.41.2-develop.3 [skip ci]
semantic-release-bot Apr 3, 2026
8950dd5
fix: restore drawer sublist scroll positions
Mygod Apr 4, 2026
1649bd2
chore(release): v1.41.2-develop.4 [skip ci]
semantic-release-bot Apr 4, 2026
006c224
chore(deps-dev): bump vite from 6.4.1 to 6.4.2 (#1206)
dependabot[bot] Apr 8, 2026
5e78ced
chore: commits go brrr
Mygod Apr 9, 2026
c513936
fix: perms cleanup
Mygod Apr 19, 2026
74dda54
chore(release): v1.41.2-develop.5 [skip ci]
semantic-release-bot Apr 19, 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
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: yarn masterfile

- name: Lint
run: yarn eslint
run: yarn lint

- name: Prettier
run: yarn prettier
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
run: yarn --prefer-offline
env:
HUSKY: 0
- name: Lint app
run: yarn lint
- name: Build app
run: yarn build
- name: Release
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ server/src/models/queries/*
# Cache
server/.cache/*
!/server/.cache/.gitkeep
.eslintcache

# Misc
ts-check.js
45 changes: 45 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,55 @@
## [1.41.2-develop.5](https://github.com/WatWowMap/ReactMap/compare/v1.41.2-develop.4...v1.41.2-develop.5) (2026-04-19)


### Bug Fixes

* perms cleanup ([c513936](https://github.com/WatWowMap/ReactMap/commit/c513936fe84f5c863644fe90555de73c723d7a44))

## [1.41.2-develop.4](https://github.com/WatWowMap/ReactMap/compare/v1.41.2-develop.3...v1.41.2-develop.4) (2026-04-04)


### Bug Fixes

* restore drawer sublist scroll positions ([8950dd5](https://github.com/WatWowMap/ReactMap/commit/8950dd56745be7ee591ccfffe6e97b6cfafb34fc))

## [1.41.2-develop.3](https://github.com/WatWowMap/ReactMap/compare/v1.41.2-develop.2...v1.41.2-develop.3) (2026-04-03)


### Bug Fixes

* weather update consistency ([184ac2f](https://github.com/WatWowMap/ReactMap/commit/184ac2fa3fbc372d896f70bf36277fa1dd2e6a22))

## [1.41.2-develop.2](https://github.com/WatWowMap/ReactMap/compare/v1.41.2-develop.1...v1.41.2-develop.2) (2026-04-03)


### Bug Fixes

* keep drawer scroll position ([a242e84](https://github.com/WatWowMap/ReactMap/commit/a242e842acaf9f5526491c7a294b8a677979b48f))
* properly set default discord auth as none ([3670810](https://github.com/WatWowMap/ReactMap/commit/3670810193e1c74bcd8352825083c069b33b1bff))

## [1.41.2-develop.1](https://github.com/WatWowMap/ReactMap/compare/v1.41.1...v1.41.2-develop.1) (2026-03-26)


### Bug Fixes

* change scan-on-demand dialog to notification ([b77145d](https://github.com/WatWowMap/ReactMap/commit/b77145dd8e037f0916d72c6a84e76fbb9584bde8))
* **pokestops:** align incident blocker visibility across markers and popups ([8acf245](https://github.com/WatWowMap/ReactMap/commit/8acf245983402e9e14ef78f628fae217c1e23000))
* weather icon uses wrong time of day for wild ([5944452](https://github.com/WatWowMap/ReactMap/commit/594445268ca027b8f2b1d9c8edce70208b23c49d))

## [1.41.1](https://github.com/WatWowMap/ReactMap/compare/v1.41.0...v1.41.1) (2026-03-15)


### Bug Fixes

* workflow git creds ([e5dc6f9](https://github.com/WatWowMap/ReactMap/commit/e5dc6f90d14fa1afb8a75bb9bdb2246213ff1c88))

# [1.41.0-develop.12](https://github.com/WatWowMap/ReactMap/compare/v1.41.0-develop.11...v1.41.0-develop.12) (2026-03-15)


### Bug Fixes

* weather icon uses wrong time of day for wild ([5944452](https://github.com/WatWowMap/ReactMap/commit/594445268ca027b8f2b1d9c8edce70208b23c49d))

# [1.41.0](https://github.com/WatWowMap/ReactMap/compare/v1.40.1...v1.41.0) (2026-03-15)


Expand Down
3 changes: 2 additions & 1 deletion config/local.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@
"redirectUri": "http://localhost:8080/auth/discord/callback",
"allowedGuilds": [],
"blockedGuilds": [],
"allowedUsers": []
"allowedUsers": [],
"clientPrompt": "none"
}
],
"areaRestrictions": [
Expand Down
3 changes: 2 additions & 1 deletion config/multi-domain-example/local.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@
"redirectUri": "http://localhost:8080/auth/discord/callback",
"allowedGuilds": [],
"blockedGuilds": [],
"allowedUsers": []
"allowedUsers": [],
"clientPrompt": "none"
}
],
"alwaysEnabledPerms": ["map"],
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "reactmap",
"version": "1.41.1",
"version": "1.41.2-develop.5",
"private": true,
"description": "React based frontend map.",
"license": "MIT",
Expand Down Expand Up @@ -47,7 +47,7 @@
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
"eslint \"**/*.{js,jsx}\" --fix"
"eslint --cache --fix"
],
"**/*": [
"prettier --write --ignore-unknown"
Expand Down Expand Up @@ -99,7 +99,7 @@
},
"dependencies": {
"@apollo/client": "3.11.4",
"@apollo/server": "5.4.0",
"@apollo/server": "5.5.0",
"@as-integrations/express5": "1.1.2",
"@emotion/react": "11.14.0",
"@emotion/styled": "11.13.0",
Expand Down Expand Up @@ -211,7 +211,7 @@
"rollup-plugin-delete": "^2.0.0",
"semantic-release": "^22",
"typescript": "5.5.4",
"vite": "^6.4.1",
"vite": "^6.4.2",
"vite-plugin-checker": "0.7.2"
},
"resolutions": {
Expand Down
3 changes: 3 additions & 0 deletions packages/config/lib/mutations.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,9 @@ const applyMutations = (config) => {
config.authentication.strategies = config.authentication.strategies.map(
(strategy) => ({
...strategy,
...(strategy.type === 'discord'
? { clientPrompt: strategy.clientPrompt ?? 'none' }
: {}),
allowedGuilds: Array.isArray(strategy.allowedGuilds)
? strategy.allowedGuilds.flatMap(replaceAliases)
: [],
Expand Down
1 change: 1 addition & 0 deletions packages/locales/lib/human/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,7 @@
"show_size_indicator": "Show Size Indicator",
"size": "Size",
"gold_stop": "Gold Stop",
"gold_stop_block": "Blocked due to a gold stop",
"profile_backups": "Profile Swapping",
"new_backup": "New Backup",
"create": "Create",
Expand Down
1 change: 1 addition & 0 deletions packages/types/lib/augmentations.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ declare global {
declare module 'express-session' {
interface SessionData {
tutorial: boolean
discordPromptRetry?: string
}
}

Expand Down
3 changes: 2 additions & 1 deletion packages/types/lib/scanner.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,8 @@ export interface Pokestop {
showcase_pokemon_id?: number
showcase_ranking_standard?: number
showcase_rankings?: ShowcaseDetails | string
hasShowcase: boolean
incident_blocker_display_type: number | null
incident_blocker_expire_timestamp: number | null
}

export type FullPokestop = FullModel<Pokestop, PokestopModel.Pokestop>
Expand Down
2 changes: 1 addition & 1 deletion packages/vite-plugins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"@rm/logger": "*"
},
"devDependencies": {
"vite": "^6.4.1"
"vite": "^6.4.2"
}
}
4 changes: 3 additions & 1 deletion server/src/graphql/typeDefs/scanner.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ type Pokestop {
power_up_level: Int
power_up_points: Int
power_up_end_timestamp: Int
hasShowcase: Boolean
showcase_expiry: Int
incident_blocker_display_type: Int
incident_blocker_expire_timestamp: Int
}

type PokemonShinyStats {
Expand Down
57 changes: 52 additions & 5 deletions server/src/models/Pokestop.js
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,41 @@ class Pokestop extends Model {
fields.forEach((field) => (target[field] = source[field]))
}

static getIncidentDisplayType(incident, isMad, hasMultiInvasions) {
return isMad && !hasMultiInvasions
? MAD_GRUNT_MAP[incident.grunt_type] || 8
: incident.display_type
}

static getIncidentBlocker(incidents, isMad, hasMultiInvasions) {
const blocker = {
displayType: 0,
expireTimestamp: 0,
}

;(incidents || []).forEach((incident) => {
const displayType = this.getIncidentDisplayType(
incident,
isMad,
hasMultiInvasions,
)
// Showcase expiry is tracked separately on the client so local timer
// updates can fall through to the next hidden blocker without a refetch.
if (
displayType === 7 &&
incident.incident_expire_timestamp > blocker.expireTimestamp
) {
blocker.displayType = 7
blocker.expireTimestamp = incident.incident_expire_timestamp
}
})

return {
displayType: blocker.displayType || null,
expireTimestamp: blocker.expireTimestamp || null,
}
}

// filters and removes unwanted data
static secondaryFilter(
queryResults,
Expand All @@ -734,7 +769,18 @@ class Pokestop extends Model {
const filteredResults = []
for (let i = 0; i < queryResults.length; i += 1) {
const pokestop = queryResults[i]
const filtered = { hasShowcase: pokestop.showcase_expiry > ts }
const canViewIncidentMetadata = perms.eventStops || perms.invasions
const incidentBlocker = canViewIncidentMetadata
? this.getIncidentBlocker(pokestop.invasions, isMad, hasMultiInvasions)
: null
const filtered = {
showcase_expiry: canViewIncidentMetadata
? pokestop.showcase_expiry || null
: null,
incident_blocker_display_type: incidentBlocker?.displayType || null,
incident_blocker_expire_timestamp:
incidentBlocker?.expireTimestamp || null,
}

this.fieldAssigner(filtered, pokestop, [
'id',
Expand Down Expand Up @@ -790,10 +836,11 @@ class Pokestop extends Model {
event.display_type === 9
? pokestop.showcase_ranking_standard
: null,
display_type:
isMad && !hasMultiInvasions
? MAD_GRUNT_MAP[event.grunt_type] || 8
: event.display_type,
display_type: this.getIncidentDisplayType(
event,
isMad,
hasMultiInvasions,
),
}))
.filter((event) =>
event.showcase_pokemon_id
Expand Down
69 changes: 54 additions & 15 deletions server/src/routes/authRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,61 @@ const loadAuthStrategies = () => {
: 'post'
if (strategy.enabled) {
const name = strategy.name ?? `${strategy.type}-${i}`
const callbackOptions = {}
const authenticateOptions = {
failureRedirect: '/',
successRedirect: '/',
}
if (strategy.type === 'discord') {
callbackOptions.prompt = strategy.clientPrompt
const isDiscordPromptRetry = (req) =>
strategy.type === 'discord' && req.session.discordPromptRetry === name
const getAuthenticateOptions = (req, includeRedirects = false) => {
const options = includeRedirects
? {
failureRedirect: '/',
successRedirect: '/',
}
: {}

if (
strategy.type === 'discord' &&
strategy.clientPrompt &&
!isDiscordPromptRetry(req)
) {
options.prompt = strategy.clientPrompt
}

return options
}
authRouter[method](
`/${name}`,
passport.authenticate(name, authenticateOptions),

authRouter[method](`/${name}`, (req, res, next) =>
passport.authenticate(name, getAuthenticateOptions(req, true))(
req,
res,
next,
),
)
authRouter[method](`/${name}/callback`, async (req, res, next) =>
passport.authenticate(
authRouter[method](`/${name}/callback`, async (req, res, next) => {
if (
strategy.type === 'discord' &&
strategy.clientPrompt === 'none' &&
!isDiscordPromptRetry(req) &&
typeof req.query.error === 'string'
) {
req.session.discordPromptRetry = name
log.debug(
TAGS.auth,
'Discord silent auth needs user interaction, retrying with approval page',
)
return res.redirect(`${req.baseUrl}/${name}/callback`)
}

if (
strategy.type === 'discord' &&
isDiscordPromptRetry(req) &&
(typeof req.query.code === 'string' ||
typeof req.query.error === 'string')
) {
delete req.session.discordPromptRetry
}

return passport.authenticate(
name,
callbackOptions,
getAuthenticateOptions(req),
async (err, user, info) => {
if (err) {
return next(err)
Expand Down Expand Up @@ -67,8 +106,8 @@ const loadAuthStrategies = () => {
}
}
},
)(req, res, next),
)
)(req, res, next)
})
log.info(
TAGS.auth,
`${method.toUpperCase()} /auth/${name}/callback route initialized`,
Expand Down
6 changes: 3 additions & 3 deletions server/src/ui/drawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ function drawer(req, perms) {
}
: BLOCKED,
pokestops:
(perms.pokestops || perms.lures || perms.quests || perms.invasions) &&
(perms.pokestops || perms.quests || perms.invasions || perms.lures) &&
state.db.models.Pokestop
? {
allPokestops: perms.pokestops || BLOCKED,
lures: perms.lures || BLOCKED,
eventStops: perms.eventStops || BLOCKED,
quests: perms.quests || BLOCKED,
invasions: perms.invasions || BLOCKED,
eventStops: perms.eventStops || BLOCKED,
lures: perms.lures || BLOCKED,
arEligible: perms.pokestops || BLOCKED,
}
: BLOCKED,
Expand Down
Loading