Skip to content

Add profile stories and community feeds - #983

Open
firework2024 wants to merge 2 commits into
Yuanpei-Intelligence:developfrom
firework2024:feat/2026-summer-xuzihan
Open

Add profile stories and community feeds#983
firework2024 wants to merge 2 commits into
Yuanpei-Intelligence:developfrom
firework2024:feat/2026-summer-xuzihan

Conversation

@firework2024

Copy link
Copy Markdown
Contributor

Summary

  • add hierarchical interest and skill tags with profile descriptions and image uploads
  • add newest-first community feeds for activity and interest/skill uploads
  • show all historical uploads on each activity detail page
  • synchronize likes and comments across community feeds and personal profiles
  • allow authors to like and comment on their own activity, interest, and skill stories
  • add explicit CSRF protection and tokens for the new session-authenticated mutations

Database changes

Includes app migrations 0017 through 0021 for profile tags, stories, images, likes, and comments.

Testing

  • python manage.py test app.test.test_profile_tags (30 passed)
  • python manage.py test (243 passed)
  • python manage.py makemigrations --check --dry-run
  • git diff --check

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0eeab6b435

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread app/profile_utils.py Outdated
)
page = Paginator(selections, 10).get_page(page_number)
for selection in page.object_list:
selection.display_description = selection.description

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Respect hidden descriptions in the skill feed

When an admin hides a PersonProfileTag description, the personal profile path blanks it, but the community skill feed still copies selection.description directly into display_description; because community/_skill_feed_item.html renders that field through _story_display.html, any hidden interest/skill text remains publicly visible on /community/skills/. Hidden profile text should be filtered the same way as profile pages before it is placed in the public feed context.

AGENTS.md reference: AGENTS.md:L969-L973

Useful? React with 👍 / 👎.

Comment thread app/profile_utils.py Outdated
raise ValidationError(f"每个标签最多保留 {MAX_STORY_IMAGES} 张图片。")
to_delete.delete()

if locked_selection.description != description:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Bump skill story timestamps on image-only edits

If a user only adds or deletes images while leaving the description unchanged, this block is skipped, so the PersonProfileTag.updated_at field is never saved even though the image set changed. Since the community skill feed is ordered by -updated_at, image-only uploads or removals can stay buried at their old tag-selection time instead of appearing as the newest profile story update.

Useful? React with 👍 / 👎.

@Morgen-Kornblume

Copy link
Copy Markdown
Collaborator

建议补充以下测试:
隐藏标签描述并保留公开图片:技能社区不得出现隐藏文字。
隐藏活动描述并保留公开图片:活动社区及活动详情不得出现隐藏文字。
标签故事仅上传图片、仅删除图片:两种操作都必须推进 updated_at。
可选相邻问题:停用父分类后,社区技能流目前仍可能展示其活动子分类中的标签,因为社区查询只检查直接分类的 is_active,与个人主页的整棵树过滤不一致。

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