giseldo/neodataset huggingface dataset:
BE: Replace missing satellite layers in presets

Layers in preset are not available anymore, since cinesat is stopped. Preset can be removed.

After stopping cinesat the following presets have some layers that are not working anymore:

* Satellite
* Radar and Satellite
* SIGMET/AIRMET

The none working satellite layers in these presets can be replaced:

**Satellite** (add updated single map preset only to map preset menu in layermanager and remove from hamburger menu) missing `HRV RGB` replace by Satcom HRV comb RGB

**Radar and Satellite**

??? (currently saying `no service available`) replace by Satcomp RSS HRV comb RGB

**SIGMET/AIRMET** (add updated single map preset only to map preset menu in layermanager and remove from hamburger menu)

missing `HRV RGB` replace by Satcomp HRV comb RGB

missing `vulkaanas` replace by Satcomp Ash RGB

Actions in BE:
* Update presets

Story points: 2.0
Send ASSISTments session data to ASSISTments at session close

* When a session from a student referred from ASSISTments ends, we send data matching the contract attached to this issue to ASSISTments
* do this as a worker job
* circuit breaker with exponential backoff should retry for 5 minutes and
  * retry if we get a 5xx code
  * if circuit breaker fails, log and send alert to Slack
* if we get a 4xx code, log it and alert in Slack so we can reach out to ASSISTments team
  * log the session id so we could try to resend later
* add to AssistmentsData doc on success or failure: no default values so we know if they really should be there or not
  * sent: boolean
  * sentAt: timestamp

Reference files:
* [upchieveEndpoint.json](/uploads/05ae9882eb9e3e8c9c63e618a7841b10/upchieveEndpoint.json)
* [upchievePayload.yaml](/uploads/a23e6805b3d5b0bfaceafd03222abbf7/upchievePayload.yaml)

## Tasks
- [x] Code review
- [x] Staging smoke tests
- [x] Merge to main
- [x] Deploy to prod

## Smoke tests
- [x] Student/volunteer can login
- [x] Student/volunteer can make/join session
- [x] Student/volunteer can use whiteboard and chat in session
- [x] At session end an assistments session queues the job

Story points: 3.0
Volunteer Emails should check if the user is banned or deactivated

We send inactive emails to volunteer users who are deactivated or banned. Checking if someone is deactivated is something we should do on all volunteer emails.

Specific example is volunteer id 60889e8836785e00232c75c4 received inactive emails.

* Ideally we should audit all volunteer emails and add a deactivated check. Maybe create a snippet for the aggregation of "volunteers who receive email" that ignores deactivated, fake, test, etc.

## Tasks
- [x] Code review
- [x] Staging smoke tests
- [x] Merge to main
- [ ] Deploy to prod

## Smoke tests
- [x] Student/volunteer can login
- [x] Student/volunteer can make/join session
- [x] Student/volunteer can use whiteboard and chat in session

Story points: 1.0
Validate: can we get api key auth working on sockets from the worker

In #802 we successfully got a socket connection, but only when auth was turned off. We should see if we can get socket.io authenticated with either a cookie strategy or https://www.passportjs.org/packages/passport-localapikey/

Right now we use a special passport.socketio package to do the auth, but we might want to strip that out and just use passport regularly as in https://socket.io/docs/v4/middlewares/#Compatibility-with-Express-middleware

## Tasks
- [ ] Code review
- [ ] Staging smoke tests
- [ ] Merge to main
- [ ] Deploy to prod

## Smoke tests
- [ ] Student/volunteer can login
- [ ] Student/volunteer can make/join session
- [ ] Student/volunteer can use whiteboard and chat in session

Story points: 2.0
Frontend: call new endpoint to determine which category selection view to show

On student dashboard mount check if `user.pastSessions.length >= 1`. If so add network service call for new endpoint to get most recent subjects. Use response to decide whether to show recent subject selection. Otherwise don't show recent subject selection.

## Notes
- wrap recent subject cards with a header and `v-if` to show the wrapper
- place caller in `src/services/UserService` to wrap network call with error handling (see `getVolunteerAvailability`)

## Tasks
- [ ] Code review
- [ ] Staging smoke tests
- [ ] Merge to main
- [ ] Deploy to prod

## Smoke tests
- [ ] Student/volunteer can login
- [ ] Student/volunteer can make/join session
- [ ] Student/volunteer can use whiteboard and chat in session
- [ ] Student with no prior sessions dashboard shows normal category selection
- [ ] Student with recent sessions show recent subject selection in addition to normal category selection
  - [ ] 1 session subject shows up as 1 tile
  - [ ] 2 sessions of distinct subjects  show up as 2 tiles in recency order
  - [ ] 3 sessions of distinct subjects  show up as 3 tiles in recency order
  - [ ] 2 past sessions of the same subject show up as one tile

Story points: 3.0
Backend: endpoint to serve 3 most recent subjects

## Requirements
- endpoint: `/api/v1/students/{studentId}/recent-subjects`
- update swagger yaml
- Endpoint signature
  - input: student user id
  - output: array of strings length 0-3
  - status codes: 
    - generic 422 input error is id is not provided
    - 400 if id does not exist or points to volunteer instead of student

## Tasks
- [ ] Code review
- [ ] Staging smoke tests
- [ ] Merge to main
- [ ] Deploy to prod

## Smoke tests
- [ ] Student/volunteer can login
- [ ] Student/volunteer can make/join session
- [ ] Student/volunteer can use whiteboard and chat in session
- [ ] Endpoint returns values as expected

Story points: 1.0
Backend: server function for determining 3 most recent subjects

Function should take a given student and return a list of their 3 most recent session subjects (from `user.pastSessions`)
- all 3 subjects are unique
- we do not care of the session for a subject was matched
- order list by recency of session with that subject
- if < 3 unique subjects are found in session history you can return list of size 0, 1, or 2
- return list of strings

** Note: lookup all session objects from past sessions array in one go upfront to minimize network calls 

## Tasks
- [ ] Code review
- [ ] Staging smoke tests
- [ ] Merge to main
- [ ] Deploy to prod

## Smoke tests
- [ ] Student/volunteer can login
- [ ] Student/volunteer can make/join session
- [ ] Student/volunteer can use whiteboard and chat in session

Story points: 2.0
Frontend: Create recent subject card component

* Create new recent subject component: https://www.figma.com/file/MrqQVjT42e1bs12DPPgktY/Upchieve---Design-Kit?node-id=92%3A11127
* Create different states of the component: disabled, hover, initial, pressed
* Write tests in StoryBook

## Tasks
- [ ] Code review
- [ ] Staging smoke tests
- [ ] Merge to main
- [ ] Deploy to prod

## Smoke tests
- [ ] Student/volunteer can login
- [ ] Student/volunteer can make/join session
- [ ] Student/volunteer can use whiteboard and chat in session

Story points: 1.0
Backend: Prevent banned students from starting a session

- Add a check to in `server/services/SessionService.ts` `startSession()` to check for banned students and if student is banned throw a `StartSessionError` with a message
- Update test to not allow banned user to start session

## Tasks
- [ ] Code review
- [ ] Staging smoke tests
- [ ] Merge to main
- [ ] Deploy to prod

## Smoke tests
- [ ] Student/volunteer can login
- [ ] Student/volunteer can make/join session
- [ ] Student/volunteer can use whiteboard and chat in session

Story points: 1.0
Frontend: Reduce student dashboard hero image height

- Reduce the hero image height for the student dashboard: https://www.figma.com/file/f6rBFhwjOhvvcfCSkMuN86/Dashboard?node-id=190%3A4116
- Validate design with Grace

## Tasks
- [ ] Code review
- [ ] Staging smoke tests
- [ ] Merge to main
- [ ] Deploy to prod

## Smoke tests
- [x] Student/volunteer can login
- [x] Student/volunteer can make/join session
- [x] Student/volunteer can use whiteboard and chat in session
- [ ] Volunteer dashboard hero image should not be shortened
- [x] Test on multiple device window sizes

Story points: 2.0
Add student policy document to storage bucket

- ~~TODO: Get the student policy document from the program team~~
- Drop the document into a bucket

## Tasks
- [ ] Code review
- [ ] Staging smoke tests
- [ ] Merge to main
- [ ] Deploy to prod

## Smoke tests
- [ ] Student/volunteer can login
- [ ] Student/volunteer can make/join session
- [ ] Student/volunteer can use whiteboard and chat in session

Story points: 0.0
Frontend: Add student banned state

- Show new banner for banned students: https://www.figma.com/file/f6rBFhwjOhvvcfCSkMuN86/Dashboard?node-id=260%3A8698
 - For "Why am I seeing this?" in a new tab it should show the document stored in this issue: https://gitlab.com/upchieve/subway/-/issues/809
- Change the student's status to be "Paused"
- Disable all of the subject cards
- Hide the "How can we help you text" on the hero image only for banned students

## Tasks
- [x] Code review
- [x] Staging smoke tests
- [x] Merge to main
- [x] Deploy to prod

## Smoke tests
- [x] Student/volunteer can login
- [x] Student/volunteer can make/join session
- [x] Student/volunteer can use whiteboard and chat in session
- [x] Banned student should see "Paused" as their status under their name in the sidebar
- [x] Banned student should see a banner on the dashboard saying "Your account is under review"
- [x] Banned student should see all subjects disabled

Story points: 3.0
Frontend: Change in-session state

- Change the banner color to match design: https://www.figma.com/file/f6rBFhwjOhvvcfCSkMuN86/Dashboard?node-id=150%3A4234 when a student is in session

## Tasks
- [ ] Code review
- [ ] Staging smoke tests
- [ ] Merge to main
- [ ] Deploy to prod

## Smoke tests
- [x] Student/volunteer can login
- [x] Student/volunteer can make/join session
- [x] Student/volunteer can use whiteboard and chat in session
- [ ] Student should see the updated banner color when in a session

Story points: 1.0
Refactor Notification to include sessionId

Add sessionId property to notification model and add index on it to avoid having to do an aggregation lookup when searching for notifications associated to a particular session.

Backfill script #805

## Tasks
- [ ] Code review
- [ ] Staging smoke tests
- [ ] Merge to main
- [ ] Deploy to prod
- [ ] Add DB index for `notifications.sessionId`

## Smoke tests
- [ ] Student/volunteer can login
- [ ] Student/volunteer can make/join session
- [ ] Student/volunteer can use whiteboard and chat in session

Story points: 0.0
Validate: Can we send a socket event from a job

Can we open a socket connection to the app server like the front end client would?
How do we test this on staging?

## Tasks
- [ ] Code review
- [ ] Staging smoke tests
- [ ] Merge to main
- [ ] Deploy to prod

## Smoke tests
- [ ] Student/volunteer can login
- [ ] Student/volunteer can make/join session
- [ ] Student/volunteer can use whiteboard and chat in session

Story points: 2.0
Create SessionService function to check if there are volunteers on-deck

An on-deck volunteer for a session:
* be certified in the session subject
  - simple check of `volunteer.subjects` array
* not be in another session at the time of checking
  - check `twilio.js:152 getActiveSessionVolunteers` and `$nin` that list
* have set availability for the current hour
  - check `twilio.js:17 getCurrentAvailabilityPath`
* have not received a notification for this session
  - ~~session object has array of notifications sent out - we can `$nin` with volunteer IDs extracted from these notifications~~
  - PENDING REFACTOR #804 : save sessionId right on the notification object and index on it to avoid the `$lookup` step for this
* have not received ANY notifications in the last 15min
  - check `twilio.js:180` and do the inverse

## Tests
- Lot's of complexity due to 5 decision points above
- Needs lots of test seed data

## Tasks
- [ ] Code review
- [ ] Staging smoke tests
- [ ] Merge to main
- [ ] Deploy to prod

## Smoke tests
- [ ] Student/volunteer can login
- [ ] Student/volunteer can make/join session
- [ ] Student/volunteer can use whiteboard and chat in session

Story points: 3.0
Visual indication for chat bot messages

* Pull out old chatbot component
* Receive chatbot messages over socket like user messages
* Make chatbot messages appear as the custom green color they currently appear with.
* Need to update the admin session review view to show the messages correctly as well. `components/admin/chatlog`
* Update the student and volunteer icons

## Tasks
- [ ] Code review
- [ ] Staging smoke tests
- [ ] Merge to main
- [ ] Deploy to prod

## Smoke tests
- [ ] Student/volunteer can login
- [ ] Student/volunteer can make/join session
- [ ] Student/volunteer can use whiteboard and chat in session
- [ ] Chatbot messages appear and persist, in correct color

Story points: 0.0
Write function that generates data for partner analytics report

* Write and unit test functions that generates the data structure in the correct columns to match the spec in the parent epic.
  * Should have row object that has all the headers
  * Should have rows that match the data
* Do this for the main sheet and the summary

## Tasks
- [ ] Code review
- [ ] Staging smoke tests
- [ ] Merge to main
- [ ] Deploy to prod

## Smoke tests
- [x] Student/volunteer can login
- [x] Student/volunteer can make/join session
- [x] Student/volunteer can use whiteboard and chat in session

Story points: 3.0
Frontend updates to show admin how to access new partner analytics report

- Remove current frontend logic that generates the corporate partner analytic report
- Excel file is downloaded once the request has finished

## Tasks
- [x] Code review
- [x] Staging smoke tests
- [x] Merge to main
- [ ] Deploy to prod

## Smoke tests
- [x] Student/volunteer can login
- [x] Student/volunteer can make/join session
- [x] Student/volunteer can use whiteboard and chat in session

Story points: 1.0
Format analytics CSV to create partner analytics report Spreadsheet

* **Format**: Update the partner analytics report function to create a spreadsheet matching the spec in the parent epic, using the data from the functions written in #793
* **Download**: Update the router/api to match the contract defined in #790 

https://stackoverflow.com/questions/13307499/http-download-file-name/13308094#13308094 : header from this link should be appended to the response

https://www.bezkoder.com/node-js-download-excel-file/

## Tasks
- [x] Code review
- [x] Staging smoke tests
- [x] Merge to main
- [ ] Deploy to prod

## Smoke tests
- [x] Student/volunteer can login
- [x] Student/volunteer can make/join session
- [x] Student/volunteer can use whiteboard and chat in session
- [x] Generate a report by calling the API in prod and make sure that the sheet gets created correctly with the correct permissions

Story points: 3.0
Add partner analytics report endpoint docs to swagger

This endpoint is not currently documented. We should add the documentation with it matching how we will be returning the new implementation where we send back a link to the created Google sheet, rather than a CSV.

Request will send through partner name and dates. Response will send back a link.

* 201 created code,
* 500 server error
* 403 unauthorized if you're not an admin
* 422 no data found

Story points: 1.0
Write a script that can use the exceljs npm package to create a sheet and put some formatted data in

This is just to do a proof of concept of using the api and validating that we know how to use the package to make a basic spreadsheet

https://www.npmjs.com/package/exceljs

* Can we create a sheet?
* Apply formatting
* Put data in correctly

## Tasks
- [x] Create POC script
- [x] Review with engineering staff

Story points: 2.0
New job to send special inactivity emails on 9/2

Job runs only on 9/2, it looks for users who have been inactive for 91+ days and sends the special email. It should also deselect the users' availability hours.

Requires email template ID from business team.

## Tasks
- [x] Code review
- [x] Staging smoke tests
- [x] Merge to main
- [x] Deploy to prod
- [x] Run addCronJob script with this job added.

## Smoke tests
- [x] Student/volunteer can login
- [x] Student/volunteer can make/join session
- [x] Student/volunteer can use whiteboard and chat in session
- [x] Tests that match the scenarios in the inactivity email feature file.

Story points: 2.0
Use UTC for inactivity calculations

Refactor lastActivityAt middleware and the volunteerEmailInactive job to use UTC timezone instead of server time zone.

## Tasks
- [x] Code review
- [x] Staging smoke tests
- [x] Merge to main
- [x] Deploy to prod

## Smoke tests
- [x] Student/volunteer can login
- [x] Student/volunteer can make/join session
- [x] Student/volunteer can use whiteboard and chat in session
- [x] `lastActivityAt` gets properly recorded

Story points: 1.0
Update inactivity email job to not send during blackout period

In emailVolunteerInactive, make a check at the beginning of the job, that if we're in the blackout period of 00:00 on 6/1 to 23:59 on 9/1, don't send an email.

## Tasks
- [x] Code review
- [x] Staging smoke tests
- [x] Merge to main
- [x] Deploy to prod

## Smoke tests
- [x] Student/volunteer can login
- [x] Student/volunteer can make/join session
- [x] Student/volunteer can use whiteboard and chat in session
- [x] Testing according to the scenarios in the inactivity email feature file.

Story points: 2.0
Write Gherkin scenarios for volunteer inactivity emails

Setup gherkin-jest in Subway. Create subdirectory for step definitions and include in setupFiles in Jest config. Create subdirectory for feature files.

Add documentation on when to use gherkin-jest vs regular jest in Subway, and when Gherkin scenarios should go in subway vs whoop-whoop.

Translate examples from https://docs.google.com/spreadsheets/d/1pQUAdImSgWGMvjYhzNP2m7XyGZOcUxk10_uiOPk84SQ/edit#gid=5004413 into scenarios in an inactivity emails feature file.

Story points: 1.0
Remove previously-banned-IP-banning logic

Currently, when a session begins, we check if a student's IP has been previously banned, and if so we ban them at that moment. We want to remove this logic while leaving the rest of the IP-ban infrastructure intact.

* Remove the recordIpAddress middleware from new session router.

## Tasks
- [x] Code review
- [x] Staging smoke tests
- [x] Merge to main
- [x] Deploy to prod

## Smoke tests
- [x] Student/volunteer can login
- [x] Student/volunteer can make/join session
- [x] Student/volunteer can use whiteboard and chat in session
- [x] Student with international IP can make session and volunteers can join it

Story points: 1.0
Add "guidelines for reporting a student" to upchieve 101

Volunteers must read our new reporting guide in order to complete the Worst Case Scenarios module

* [x] Convert https://docs.google.com/presentation/d/1Ex5Z3jNcP4gGmKuelCXIDvu6lYhMf4FNSiS2Yu2kg-k/edit?usp=sharing to pdf and replace the `challenging-scenarios.pdf` in the upc-training-materials bucket
* [x] Convert https://docs.google.com/document/d/1W19FPfyYwObxZ8P2hzNaP9bxnZODQqEbxlnZv9vXR6k/edit?usp=sharing to pdf and add to the upc-training-materials bucket
* [x] The new document should be labeled "Guidelines for Reporting a Student" and have the book icon
* [x] The ordering of the Worst Case Scenarios module tasks should be: existing video, new reporting guide, existing deck

Add in utils/training-courses.ts

resourceId is name of pdf in S3 bucket, but without suffix.
material key is random, make one up that is distinct from the others, six-character alphanumeric

## Tasks
- [x] Upload resources
- [x] Code review
- [x] Staging smoke tests
- [x] Merge to main
- [x] Deploy to prod

## Smoke tests
- [x] Student/volunteer can login
- [x] Student/volunteer can make/join session
- [x] Student/volunteer can use whiteboard and chat in session
- [x] Volunteer can see new reporting guide in UPchieve 101

Story points: 1.0
Final debug and deployment of “wait-time-heat-map”

## Tasks
- [x] Code review
- [x] Staging smoke tests
- [x] Merge to main
- [x] Deploy to prod

## Smoke tests
- [x] Student/volunteer can login
- [x] Student/volunteer can make/join session
- [x] Student/volunteer can use whiteboard and chat in session
- [x] Volunteer should be able to update their availability
- [x] Certified volunteer should receive text message if a new session was started during their availability times
- [x] Volunteer should see clock icon for periods of high wait times

Story points: 0.0
Refactor backend to match new session reporting requirements

Acceptance Criteria:
* Volunteers will have only two choices for why they are reporting a session
  * Choice "This student was extremely rude or inappropriate" will auto-ban the student's account
  * Choice "I am worried for the immediate safety of this student" will not auto-ban a student's account

Implementation notes:
* Refactor backend to respect ban requirements above
* Refactor backend to put send new ban notification emails to student at correct time
  * reportSession checks if session is ended, and if so, sends the email
  * if the session is not ended, then we save a `<sessionId>-reported` or  similar key in the cache using cache repo. Use `saveWithExpiration`
  * endSession function should check the cache for existence of that key, and if it exists, send the email
* reportSession/endSession notifications should always bcc support@upchieve.org
* Refactor swagger to show accurate values sent through

Pre-reqs:
* get the email template ids from Programs

## Tasks
- [x] Code review
- [x] Staging smoke tests
- [x] Merge to main
- [x] Deploy to prod

## Smoke tests
- [x] Student/volunteer can login
- [x] Student/volunteer can make/join session
- [x] Student/volunteer can use whiteboard and chat in session
- [x] Student user is reported for either reason after session ends and the correct emails arrive in mailtrap and Hubspot ASAP
- [x] Student is reported for either reason during session and the correct emails arrive in mailtrap and Hubspot AFTER the session ends

Story points: 5.0
Create job to process session report emails

Acceptance Criteria:
* Write job to process session report emails
* Refactor reportSession and endSession to queue emails instead of directly sending them


## Tasks
- [ ] Code review
- [ ] Staging smoke tests
- [ ] Merge to main
- [ ] Deploy to prod

## Smoke tests
- [ ] Student/volunteer can login
- [ ] Student/volunteer can make/join session
- [ ] Student/volunteer can use whiteboard and chat in session
- [ ] Report test student as volunteer and see emails come into mailtrap and Hubspot

Story points: 2.0
Refactor reporting pop-up to match new requirements

Acceptance Criteria:
* Volunteers will have only two choices for why they are reporting a session
  * Choice "This student was extremely rude or inappropriate" will auto-ban the student's account
  * Choice "I am worried for the immediate safety of this student" will not auto-ban a student's account
* Volunteers can reach the reporting guide from the reporting popup

Implementation notes:
* Refactor frontend modal component and backend to use the same data structure for text values

Pre-reqs:
* get the reporting guide from Programs
* get the email template ids from Programs

Final mockup: https://gitlab.com/upchieve/staff-requests/uploads/9c6d1215dc4b93c153fc384460ae03ef/Report_pop_up_2.png

## Tasks
- [x] Code review
- [x] Staging smoke tests
- [x] Update line 180 of `constants.ts`
- [x] Merge to main
- [x] Deploy to prod

## Smoke tests
- [x] Student/volunteer can login
- [x] Student/volunteer can make/join session
- [x] Student/volunteer can use whiteboard and chat in session
- [x] Reporting pop up is accurate to spec

Story points: 1.0