Skip to content

feat(ui): add ConfigHistory page to display audit logs - #374

Merged
yash-pouranik merged 1 commit into
geturbackend:mainfrom
VivekTekwani021:feat/config-changelog-ui
Jul 31, 2026
Merged

feat(ui): add ConfigHistory page to display audit logs#374
yash-pouranik merged 1 commit into
geturbackend:mainfrom
VivekTekwani021:feat/config-changelog-ui

Conversation

@VivekTekwani021

@VivekTekwani021 VivekTekwani021 commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

project change log UI

Summary by CodeRabbit

  • New Features
    • Added an Audit Log page for reviewing project configuration changes.
    • View change categories, timestamps, actors, and detailed field differences.
    • Filter logs by category, refresh results, and navigate through paginated entries.
    • Added loading, error recovery, and empty-state displays.
    • Added Audit Log access to project navigation.

@vercel

vercel Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

@VivekTekwani021 is attempting to deploy a commit to the Yash Pouranik's projects Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
vercel Bot temporarily deployed to Preview – urbackend July 31, 2026 06:29 Inactive
@vercel

vercel Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ur-backend-web-dashboard Ready Ready Preview Jul 31, 2026 11:48am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
urbackend Skipped Skipped Jul 31, 2026 11:48am

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a protected project audit log route and sidebar link. The new ConfigHistory page retrieves paginated logs, supports category filtering and refresh, and renders actor details, timestamps, expandable diffs, loading states, errors, and empty states.

Changes

Configuration audit log

Layer / File(s) Summary
Audit log display components
apps/web-dashboard/src/pages/ConfigHistory.jsx
Adds category metadata, timestamp formatting, badges, expandable diffs, log rows, and loading skeletons.
Audit log data and page states
apps/web-dashboard/src/pages/ConfigHistory.jsx
Adds project-scoped log retrieval, filtering, pagination, refresh handling, error handling, and page states.
Protected route and navigation
apps/web-dashboard/src/App.jsx, apps/web-dashboard/src/components/Layout/Sidebar.jsx
Registers the protected route and adds the project-scoped “Audit Log” navigation link.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant Sidebar
  participant MainLayout
  participant ConfigHistory
  participant ProjectScopedAPI

  User->>Sidebar: Select Audit Log
  Sidebar->>MainLayout: Navigate to project audit-log route
  MainLayout->>ConfigHistory: Render protected page
  ConfigHistory->>ProjectScopedAPI: Request project-scoped audit logs
  ProjectScopedAPI-->>ConfigHistory: Return logs and pagination data
  ConfigHistory-->>User: Display filtered audit log entries
Loading

Possibly related PRs

Suggested reviewers: nitin-kumar-yadav1307, yash-pouranik

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the addition of the ConfigHistory page for displaying project audit logs.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@yash-pouranik

Copy link
Copy Markdown
Member

review?
@coderabbitai

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

@yash-pouranik I will review pull request #374.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/web-dashboard/src/pages/ConfigHistory.jsx`:
- Around line 217-259: Update the useEffect that currently defines
loadInitialData to call the existing fetchLogs(1, category) directly, removing
the duplicated request, mounted flag, and separate error handling. Ensure
fetchLogs remains responsible for loading state, error state, and toast
notifications for initial loads and category changes, and update its
dependencies as needed for the effect to use it safely.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a7e962ff-3bd8-476b-b462-6a3096966108

📥 Commits

Reviewing files that changed from the base of the PR and between 1bf1705 and 3906fad.

📒 Files selected for processing (3)
  • apps/web-dashboard/src/App.jsx
  • apps/web-dashboard/src/components/Layout/Sidebar.jsx
  • apps/web-dashboard/src/pages/ConfigHistory.jsx

Comment thread apps/web-dashboard/src/pages/ConfigHistory.jsx
@yash-pouranik

Copy link
Copy Markdown
Member

I think this is not important as of now
u can create a issue for this
@coderabbitai

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo="geturbackend/urBackend"
pr_number="374"

gh api "repos/$repo/pulls/$pr_number/comments?per_page=100" \
  --paginate \
  --jq '.[] | select(.user.login == "coderabbitai[bot]" or .user.login == "coderabbitai") | {id, html_url, path, line, body}'

Length of output: 3830


🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo="geturbackend/urBackend"
requester="yash-pouranik"

issue_body=$(cat <<'EOF'
## Summary

Consolidate the duplicated configuration audit-log request logic in `apps/web-dashboard/src/pages/ConfigHistory.jsx`.

## Rationale

`fetchLogs` displays an error toast when a request fails. The separate initial-load and category-change logic only sets the page error state. This produces different failure behavior for equivalent audit-log requests.

## Required changes

- Remove the duplicated request implementation in the `useEffect` initial-load/category-change path.
- Use the shared `fetchLogs(1, category)` path for initial load and category changes.
- Keep loading state, error state, and error toast behavior consistent for initial load, category changes, refresh, retry, and pagination.
- Update React hook dependencies as needed.

## Affected area

- `apps/web-dashboard/src/pages/ConfigHistory.jsx`

## Acceptance criteria

- The page has one implementation for fetching configuration audit logs.
- A failed initial load displays the same error toast behavior as refresh, retry, and pagination failures.
- A failed category change displays the same error toast behavior as refresh, retry, and pagination failures.
- Existing loading, empty, retry, and pagination behavior remains intact.

## References

- Deferred from PR `#374`: https://github.com/geturbackend/urBackend/pull/374
- Code review comment: https://github.com/geturbackend/urBackend/pull/374#discussion_r3690248783
- Requested by: `@yash-pouranik`
EOF
)

gh issue create \
  --repo "$repo" \
  --title "Refactor ConfigHistory audit-log loading to use shared fetch logic" \
  --body "$issue_body" \
  --assignee "$requester"

Length of output: 1914


@yash-pouranik Created follow-up issue #380: Refactor ConfigHistory audit-log loading to use shared fetch logic.

It is assigned to you and links to PR #374 and the review comment.

You are interacting with an AI system.

@yash-pouranik yash-pouranik linked an issue Jul 31, 2026 that may be closed by this pull request
18 tasks
@yash-pouranik yash-pouranik self-assigned this Jul 31, 2026
@yash-pouranik
yash-pouranik merged commit 94be42f into geturbackend:main Jul 31, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor ConfigHistory audit-log loading to use shared fetch logic Feature – Project Configuration Change Log

2 participants