Discussion Forum page does not dynamically update for the first thread

Open
#10,865 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
php
Domain
full-stack

Research direction

Start by tracing the Discussion Forum page's websocket update path, focusing on the empty-forum state and the event emitted when the first thread is created. Reproduce the two-browser scenario from the issue, then verify that Browser 2 displays the new first thread without a refresh while existing thread and post updates continue to work.

Written by the indexing model from the issue text.

Description

bug Discussion Forum / Live Chat

Describe the bug

When a user opens the Discussion Forum and no threads have been created, a page with "A thread hasn't been created yet. Be the first to do so!" appears. If this page is still open when another user creates the first thread, it does not automatically update to show this thread.

Expected behavior

The page should update and show the first thread. (Using websockets! Note that all other tested cases of adding a post or a thread seem to work correctly and websockets updates the forum page of other users.)

Steps to reproduce

Steps to reproduce the behavior:

  1. Open the BLANK course and enable Discussion Forum.
  2. Open the empty Discussion Forum in two browsers as two different users
  3. In Browser 1, create a the first thread.
  4. Observe that Browser 2 does not update.

Configuration

  • OS: Arch Linux
  • Browser: Firefox and Chromium

Context

Discovered while reviewing #9906.

Dominant language
PHP
Stars
793
Forks
1.1k
Avg merge
2d 16h
Merged PRs (30d)
78

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Submitty/Submitty

All issues in Submitty/Submitty

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.