Skip to content

fix(controller): wire up SessionSharesHandler in NewHandlers - #2363

Merged
EItanya merged 2 commits into
kagent-dev:mainfrom
onematchfox:fix-session-share
Jul 31, 2026
Merged

fix(controller): wire up SessionSharesHandler in NewHandlers#2363
EItanya merged 2 commits into
kagent-dev:mainfrom
onematchfox:fix-session-share

Conversation

@onematchfox

Copy link
Copy Markdown
Contributor

SessionShares was declared on the Handlers struct and routed in server.go, but never constructed in NewHandlers, leaving it nil and resulting in a nil pointer dereference when any caller tried to make use of the endpoint.

Seems to have somehow got lost in the final commits on #1935.

Copilot AI review requested due to automatic review settings July 30, 2026 08:09
@onematchfox
onematchfox requested a review from a team as a code owner July 30, 2026 08:09
@github-actions github-actions Bot added the bug Something isn't working label Jul 30, 2026
`SessionShares` was declared on the `Handlers` struct and routed in
server.go, but never constructed in `NewHandlers`, leaving it nil and resulting in a nil pointer dereference when any caller tried to make use of the endpoint.

Seems to have somehow got lost in the final commits on kagent-dev#1935.

Signed-off-by: Brian Fox <878612+onematchfox@users.noreply.github.com>

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 fixes an initialization gap in the Go HTTP server handler wiring: the SessionShares handler was routed but never constructed in NewHandlers, which could lead to a nil pointer dereference when the session sharing endpoints are called.

Changes:

  • Construct SessionSharesHandler in NewHandlers by wiring SessionShares: NewSessionSharesHandler(base).
  • Ensures the already-registered session share routes in server.go have a non-nil handler implementation.

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

@EItanya
EItanya merged commit d0917e4 into kagent-dev:main Jul 31, 2026
30 checks passed
onematchfox added a commit to onematchfox/kagent that referenced this pull request Aug 11, 2026
…dev#2363)

`SessionShares` was declared on the `Handlers` struct and routed in
server.go, but never constructed in `NewHandlers`, leaving it nil and
resulting in a nil pointer dereference when any caller tried to make use
of the endpoint.

Seems to have somehow got lost in the final commits on kagent-dev#1935.

Signed-off-by: Brian Fox <878612+onematchfox@users.noreply.github.com>
Co-authored-by: Peter Jausovec <peterj@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants