Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 5, 2025

Staff names from CSV are stored in uppercase "LAST, FIRST" format and need to display as proper case "First Last" in calendar event popups.

Changes

  • Added formatStaffNames() utility in src/lib/csv-parser.ts

    • Converts uppercase "LAST, FIRST" to "First Last"
    • Handles multiple lecturers: "NEVE, PAUL, SMITH, JOHN" → "Paul Neve, John Smith"
    • Handles edge cases: empty strings, single names, malformed input
  • Updated CSV parsing to apply formatting to lecturer field

Example

// Input from CSV
lecturer: "NEVE, PAUL"

// After formatStaffNames()
lecturer: "Paul Neve"

// Multiple lecturers
"NEVE, PAUL, SMITH, JOHN"  "Paul Neve, John Smith"

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • fonts.googleapis.com
    • Triggering command: /usr/local/bin/node /usr/local/bin/node /home/REDACTED/work/Valdi/Valdi/node_modules/next/dist/compiled/jest-worker/processChild.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Expanding on Lecturer In Popup Card Issue</issue_title>
<issue_description>> # Issue

When getting the staff names, formatting needs to be applied to the output:

Raw Column:

Staff member(s) -> NEVE, PAUL

Output:

lecturer -> Paul Neve

Sudo Code:

staff_col = row["Staff member(s)"]

if staff_col.length() <= 2
    firstname = staff_col[1]
    lastname = staff_col[0]

else if staff_col.length > 3
    for i = 0, staff_col.length < 0, i++
        firstname.append(staff_col[if i is even])
        lastname.append(staff_col[if i is odd])

Originally posted by @JayNightmare in #8</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI self-assigned this Dec 5, 2025
@coderabbitai
Copy link

coderabbitai bot commented Dec 5, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI changed the title [WIP] Fix formatting for staff names in popup card Format lecturer names from "LAST, FIRST" to "First Last" in popup cards Dec 5, 2025
Copilot AI requested a review from JayNightmare December 5, 2025 03:56
Copilot finished work on behalf of JayNightmare December 5, 2025 03:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expanding on Lecturer In Popup Card Issue

2 participants