Skip to content

Improve logging and add PageProps interface for announcements - #7

Merged
roble merged 3 commits into
mainfrom
dev
Apr 10, 2026
Merged

Improve logging and add PageProps interface for announcements#7
roble merged 3 commits into
mainfrom
dev

Conversation

@roble

@roble roble commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

This pull request introduces a small improvement to the logging in the Announcements module by switching from console.log to console.debug for initialization messages. Additionally, it updates the User type definition to optionally include an announcement property.

Type definition update:

  • The User interface in resources/js/types/index.d.ts now optionally includes an announcement property of type Announcement | null, allowing user objects to reference an announcement if present.

Logging improvements:

  • Changed logging in the Announcements module (resources/js/app.ts) from console.log to console.debug for both setup and afterMount lifecycle methods, making debug messages less intrusive in production logs.

Copilot AI review requested due to automatic review settings April 10, 2026 19:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to improve the Announcements module’s developer experience by reducing logging noise and by wiring an announcement value into Inertia’s shared PageProps via TypeScript module augmentation.

Changes:

  • Added an Inertia PageProps module augmentation to include announcement?: Announcement | null.
  • Switched Announcements initialization logs from console.log to console.debug.
  • Removed patches/types.patch (previously used to patch types).

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
resources/js/types/page-props.d.ts Adds Inertia PageProps augmentation for announcement.
resources/js/app.ts Changes Announcements module logs from log to debug.
patches/types.patch Deletes the old type patch file.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@roble
roble merged commit ea337e4 into main Apr 10, 2026
2 checks passed
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.

2 participants